From ddf1d236eb864507239fdde7e4c83b980a6ddea9 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Tue, 7 Apr 2026 00:23:32 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20markdown=20CSS=20not=20applying=20to=20co?= =?UTF-8?q?mments=20=E2=80=94=20add=20lt-markdown=20class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit comment-text divs with data-markdown were never getting the lt-markdown class, so all scoped CSS (ul/ol/li bullets, mark, del, task items, etc.) had no effect. Fixed in PHP template, JS comment builder, and renderMarkdownComments(). Co-Authored-By: Claude Sonnet 4.6 --- assets/js/markdown.js | 1 + assets/js/ticket.js | 2 +- views/TicketView.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/js/markdown.js b/assets/js/markdown.js index 85b8b32..33a4a57 100644 --- a/assets/js/markdown.js +++ b/assets/js/markdown.js @@ -516,6 +516,7 @@ function processPlainTextComments() { */ function renderMarkdownComments() { document.querySelectorAll('.comment-text[data-markdown]:not([data-rendered])').forEach(el => { + el.classList.add('lt-markdown'); el.innerHTML = parseMarkdown(el.textContent); el.dataset.rendered = '1'; }); diff --git a/assets/js/ticket.js b/assets/js/ticket.js index a218435..827f820 100644 --- a/assets/js/ticket.js +++ b/assets/js/ticket.js @@ -244,7 +244,7 @@ function buildCommentElement(opts) { '' + lt.escHtml(opts.createdAt) + '' + '
' + replyBtn + modBtns + '
' + '' + - '
' + opts.commentText + '
' + diff --git a/views/TicketView.php b/views/TicketView.php index 1a4095e..1929237 100644 --- a/views/TicketView.php +++ b/views/TicketView.php @@ -605,7 +605,7 @@ $progressClass = $slaBreached ? 'lt-progress--red' : ($slaPct >= 75 ? 'lt-progr -
>