mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 06:47:01 +00:00
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
|
||||
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>")
|
||||
|
Loading…
x
Reference in New Issue
Block a user