zero.js 1.7 KB

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