zero.mjs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // "Zero" preset, with nothing enabled. Useful for manual configuring of simple
  2. // modes. For example, to parse bold/italic only.
  3. export default {
  4. options: {
  5. // Enable HTML tags in source
  6. html: false,
  7. // Use '/' to close single tags (<br />)
  8. xhtmlOut: false,
  9. // Convert '\n' in paragraphs into <br>
  10. breaks: false,
  11. // CSS language prefix for fenced blocks
  12. langPrefix: 'language-',
  13. // autoconvert URL-like texts to links
  14. linkify: false,
  15. // Enable some language-neutral replacements + quotes beautification
  16. typographer: false,
  17. // Double + single quotes replacement pairs, when typographer enabled,
  18. // and smartquotes on. Could be either a String or an Array.
  19. //
  20. // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
  21. // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
  22. quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
  23. // Highlighter function. Should return escaped HTML,
  24. // or '' if the source string is not changed and should be escaped externaly.
  25. // If result starts with <pre... internal wrapper is skipped.
  26. //
  27. // function (/*str, lang*/) { return ''; }
  28. //
  29. highlight: null,
  30. // Internal protection, recursion limit
  31. maxNesting: 20
  32. },
  33. components: {
  34. core: {
  35. rules: [
  36. 'normalize',
  37. 'block',
  38. 'inline',
  39. 'text_join'
  40. ]
  41. },
  42. block: {
  43. rules: [
  44. 'paragraph'
  45. ]
  46. },
  47. inline: {
  48. rules: [
  49. 'text'
  50. ],
  51. rules2: [
  52. 'balance_pairs',
  53. 'fragments_join'
  54. ]
  55. }
  56. }
  57. }