1
0

marked.js 982 B

12345678910111213141516171819202122232425262728293031323334
  1. var md = {compilers: {}}
  2. md.compilers.marked = (() => {
  3. var defaults = {
  4. breaks: false,
  5. gfm: true,
  6. pedantic: false,
  7. sanitize: false,
  8. smartLists: false,
  9. smartypants: false,
  10. tables: true,
  11. langPrefix: 'language-' // prism
  12. }
  13. var description = {
  14. breaks: 'Enable GFM line breaks\n(requires the gfm option to be true)',
  15. gfm: 'Enable GFM\n(GitHub Flavored Markdown)',
  16. pedantic: 'Don\'t fix any of the original markdown\nbugs or poor behavior',
  17. sanitize: 'Ignore any HTML\nthat has been input',
  18. smartLists: 'Use smarter list behavior\nthan the original markdown',
  19. smartypants: 'Use "smart" typographic punctuation\nfor things like quotes and dashes',
  20. tables: 'Enable GFM tables\n(requires the gfm option to be true)'
  21. }
  22. var ctor = ({storage: {state}}) => ({
  23. defaults,
  24. description,
  25. compile: (markdown) =>
  26. marked(markdown, state.marked)
  27. })
  28. return Object.assign(ctor, {defaults, description})
  29. })()