Fix markdown CSS not applying to comments — add lt-markdown class
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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';
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user