gomuks icon indicating copy to clipboard operation
gomuks copied to clipboard

New line characters ignored in some code blocks

Open whyvl opened this issue 4 years ago • 1 comments

In Haskell syntax highlighted code blocks, new lines are sometimes not working. For example,

public export
data Binary : Endianness -> Nat -> Type where
  Nil : Binary endian 0
  (::) : Digit -> Binary endian n -> Binary endian (S n)

in gomuks is rendered as

public export
data Binary : Endianness -> Nat -> Type where Nil : Binary endian 0 (::) : Digit -> Binary endian n -> Binary endian (S n)

whyvl avatar Mar 13 '21 07:03 whyvl

Upon further inspection it seems to be that in ui/messages/html/parser.go, "\n" characters are not replaced with <br/>, therefore causing this bug.

whyvl avatar Mar 13 '21 08:03 whyvl