Fix double-parsing of markdown comments on page load
Lint / PHP (phpcs PSR-12) (push) Failing after 16s
Lint / JS (eslint) (push) Successful in 7s
Lint / PHP requirements (version + extensions) (push) Successful in 19s
Security / PHP Security (semgrep) (push) Successful in 1m1s
Lint / Deploy (push) Has been skipped
Lint / Notify on failure (push) Successful in 2s
Lint / PHP (phpcs PSR-12) (push) Failing after 16s
Lint / JS (eslint) (push) Successful in 7s
Lint / PHP requirements (version + extensions) (push) Successful in 19s
Security / PHP Security (semgrep) (push) Successful in 1m1s
Lint / Deploy (push) Has been skipped
Lint / Notify on failure (push) Successful in 2s
This commit is contained in:
@@ -321,9 +321,10 @@ function buildTable(rows) {
|
||||
|
||||
// Apply markdown rendering to all elements with data-markdown attribute
|
||||
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;
|
||||
element.innerHTML = parseMarkdown(markdownText);
|
||||
element.dataset.rendered = '1';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user