Ship CSRF-drift + markdown fixes to production #25
@@ -321,9 +321,10 @@ function buildTable(rows) {
|
|||||||
|
|
||||||
// Apply markdown rendering to all elements with data-markdown attribute
|
// Apply markdown rendering to all elements with data-markdown attribute
|
||||||
function renderMarkdownElements() {
|
function renderMarkdownElements() {
|
||||||
document.querySelectorAll('[data-markdown]').forEach(element => {
|
document.querySelectorAll('[data-markdown]:not([data-rendered])').forEach(element => {
|
||||||
const markdownText = element.getAttribute('data-markdown') || element.textContent;
|
const markdownText = element.getAttribute('data-markdown') || element.textContent;
|
||||||
element.innerHTML = parseMarkdown(markdownText);
|
element.innerHTML = parseMarkdown(markdownText);
|
||||||
|
element.dataset.rendered = '1';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user