- Configure marked with async, breaks, and GFM options - Update markdown processing to use textContent and async marked.parse - Replace synchronous innerHTML parsing with awaited async parsing
1 line
149 B
JavaScript
1 line
149 B
JavaScript
marked.use({"async":!0,breaks:!0,gfm:!0});document.querySelectorAll(".markdown").forEach(async n=>{n.innerHTML=await marked.parse(n.textContent)})(); |