diff --git a/src/Lepiter-HTML/LeHtmlTextSnippetVisitor.class.st b/src/Lepiter-HTML/LeHtmlTextSnippetVisitor.class.st index e9503c1ac..287e56020 100644 --- a/src/Lepiter-HTML/LeHtmlTextSnippetVisitor.class.st +++ b/src/Lepiter-HTML/LeHtmlTextSnippetVisitor.class.st @@ -223,7 +223,17 @@ LeHtmlTextSnippetVisitor >> visitString: aString [ { #category : #generated } LeHtmlTextSnippetVisitor >> visitText: aText [ - context html escape: aText content. + | aString | + aString := aText content. + aString size = 1 + ifFalse: [ context html escape: aString ] + ifTrue: [ + aString first = Character lf + ifTrue: [ context html nextPutAll: '
' ] + ifFalse: [ + aString first = Character tab + ifTrue: [ context html nextPutAll: ' ' ] + ifFalse: [ context html escape: aString ] ] ]. exportedNodes add: aText ]