Avoid replace URL cross multiple line of text
This commit is contained in:
@@ -229,7 +229,7 @@ Kirigami.OverlayDrawer {
|
|||||||
TextEdit {
|
TextEdit {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: room && room.topic ? room.topic.replace(replaceLinks, "<a href=\"$1\">$1</a>") : i18n("No Topic")
|
text: room && room.topic ? room.topic.replace(replaceLinks, "<a href=\"$1\">$1</a>") : i18n("No Topic")
|
||||||
readonly property var replaceLinks: /(https:\/\/[^ ]*)/
|
readonly property var replaceLinks: /(http[s]?:\/\/[^ \r\n]*)/g
|
||||||
textFormat: TextEdit.MarkdownText
|
textFormat: TextEdit.MarkdownText
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
|||||||
Reference in New Issue
Block a user