From fa4fb4d32b08185eda03f497130e793b951ed534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 31 Mar 2023 13:35:15 +0200 Subject: [PATCH] 'TextHighlighter.ToHTML()' does not emit a void line at the beginning anymore. [GB.EVAL.HIGHLIGHT] * BUG: 'TextHighlighter.ToHTML()' does not emit a void line at the beginning anymore. --- comp/src/gb.eval.highlight/.src/TextHighlighter.class | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/comp/src/gb.eval.highlight/.src/TextHighlighter.class b/comp/src/gb.eval.highlight/.src/TextHighlighter.class index 293d2aca6..ce4e8b773 100644 --- a/comp/src/gb.eval.highlight/.src/TextHighlighter.class +++ b/comp/src/gb.eval.highlight/.src/TextHighlighter.class @@ -133,8 +133,6 @@ Public Sub ToHTML(Text As String, Optional Theme As Variant) As String aText = Split(Text, "\n") iColor = 0 - aResult.Add("") - sOldStyle = "color:#000000;" For Y = 0 To aText.Max @@ -177,8 +175,8 @@ Public Sub ToHTML(Text As String, Optional Theme As Variant) As String If hStyle.Dotted Then sStyle &= "text-decoration:underline dotted;" If sStyle <> sOldStyle Then + sHtml = If(sOldStyle, "", "") & "" & sHtml sOldStyle = sStyle - sHtml = "" & sHtml Endif sLineHtml &= sHtml @@ -199,7 +197,7 @@ Public Sub ToHTML(Text As String, Optional Theme As Variant) As String Next - Return aResult.Join("
") & "
" + Return "" & aResult.Join("
") & "
" End