fix: newline replacement with `<br/>` should replace Windows `\r\n` line endings also
This commit is contained in:
parent
1ea4af17af
commit
d618d0cc53
|
@ -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
|
# See render-inline in status-react/src/status_im/ui/screens/chat/message/message.cljs
|
||||||
proc renderInline(self: ChatMessageList, elem: TextItem): string =
|
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:
|
case elem.textType:
|
||||||
of "": result = value
|
of "": result = value
|
||||||
of "code": result = fmt("<code>{value}</code>")
|
of "code": result = fmt("<code>{value}</code>")
|
||||||
|
|
Loading…
Reference in New Issue