render inline \`code\` in monospace with subtle background
This commit is contained in:
parent
c2ff88e8e6
commit
7cd46337a3
|
|
@ -522,6 +522,8 @@ ApplicationWindow {
|
|||
function linkifyPaths(text) {
|
||||
// Escape HTML entities first
|
||||
let escaped = text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|
||||
// Inline code: `text` → monospace styled span
|
||||
escaped = escaped.replace(/`([^`]+)`/g, '<code style="font-family:monospace;background:rgba(128,128,128,0.15);padding:1px 4px;border-radius:3px;">$1</code>')
|
||||
// Convert newlines to <br>
|
||||
escaped = escaped.replace(/\n/g, '<br>')
|
||||
// Match /absolute/path or /absolute/path:line
|
||||
|
|
|
|||
Reference in New Issue