Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Readme

marked

marked is a classic Markdown parser in JavaScript. I really don't like it! I don't recommend it! The people who made it and worked on it are great, but I think you really shouldn't use it.

  • It supports a non-standard variation of Markdown, so you can't easily switch to another parser once you've encouraged people to write "in the marked style"
  • It allows but doesn't sanitize HTML, which promotes a lot of XSS attacks
  • It doesn't use an intermediate AST like remark or support plugins.

Really it's a much better idea to use micromark or remark.

1
2
3
4
export let markedExample = (async () => {
const marked = await import("npm:marked");
return marked.parse("**Bold text!**");
})();
October 23, 2023