diff --git a/gui/main.qml b/gui/main.qml index c16e803..d3e0b4a 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -519,17 +519,7 @@ ApplicationWindow { // --- Chat block delegates --- - function linkifyPaths(text) { - // Escape HTML entities first - let escaped = text.replace(/&/g, '&').replace(//g, '>') - // Inline code: `text` → monospace styled span - escaped = escaped.replace(/`([^`\n]+)`/g, '$1') - // Convert newlines to
- escaped = escaped.replace(/\n/g, '
') - // Match /absolute/path or /absolute/path:line - escaped = escaped.replace(/(\/[\w\-.\/]+(?::\d+)?)/g, '$1') - return escaped - } + Component { id: userDelegate @@ -702,12 +692,12 @@ ApplicationWindow { id: proseSubDelegate Text { width: parent ? parent.width : implicitWidth - text: root.linkifyPaths(subBlock.content) + text: subBlock.content || "" wrapMode: Text.Wrap - textFormat: Text.RichText + textFormat: Text.MarkdownText color: palette.text font.pixelSize: Qt.application.font.pixelSize - lineHeight: 1.4 + lineHeight: 1.3 onLinkActivated: function(link) { Qt.openUrlExternally(link) }