fix: newline replacement with `<br/>` should replace Windows `\r\n` line endings also

This commit is contained in:
Michael Bradley, Jr 2020-12-15 12:03:20 -06:00 committed by Iuri Matias
parent 1ea4af17af
commit d618d0cc53
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ proc mention(self: ChatMessageList, pubKey: string): string =
# See render-inline in status-react/src/status_im/ui/screens/chat/message/message.cljs
proc renderInline(self: ChatMessageList, elem: TextItem): string =
let value = escape_html(elem.literal).multiReplace(("\n", "<br/>"))
let value = escape_html(elem.literal).multiReplace(("\r\n", "<br/>")).multiReplace(("\n", "<br/>"))
case elem.textType:
of "": result = value
of "code": result = fmt("<code>{value}</code>")