render inline \`code\` in monospace with subtle background

This commit is contained in:
Levi Neely 2026-07-16 07:04:46 +02:00
parent c2ff88e8e6
commit 7cd46337a3
1 changed files with 2 additions and 0 deletions

View File

@ -522,6 +522,8 @@ ApplicationWindow {
function linkifyPaths(text) {
// Escape HTML entities first
let escaped = text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
// 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