default.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435
  1. """markdown-it default options."""
  2. from ..utils import PresetType
  3. def make() -> PresetType:
  4. return {
  5. "options": {
  6. "maxNesting": 100, # Internal protection, recursion limit
  7. "html": False, # Enable HTML tags in source
  8. # this is just a shorthand for .disable(["html_inline", "html_block"])
  9. # used by the linkify rule:
  10. "linkify": False, # autoconvert URL-like texts to links
  11. # used by the replacements and smartquotes rules:
  12. # Enable some language-neutral replacements + quotes beautification
  13. "typographer": False,
  14. # used by the smartquotes rule:
  15. # Double + single quotes replacement pairs, when typographer enabled,
  16. # and smartquotes on. Could be either a String or an Array.
  17. # For example, you can use '«»„“' for Russian, '„“‚‘' for German,
  18. # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
  19. "quotes": "\u201c\u201d\u2018\u2019", # /* “”‘’ */
  20. # Renderer specific; these options are used directly in the HTML renderer
  21. "xhtmlOut": False, # Use '/' to close single tags (<br />)
  22. "breaks": False, # Convert '\n' in paragraphs into <br>
  23. "langPrefix": "language-", # CSS language prefix for fenced blocks
  24. # Highlighter function. Should return escaped HTML,
  25. # or '' if the source string is not changed and should be escaped externally.
  26. # If result starts with <pre... internal wrapper is skipped.
  27. #
  28. # function (/*str, lang, attrs*/) { return ''; }
  29. #
  30. "highlight": None,
  31. },
  32. "components": {"core": {}, "block": {}, "inline": {}},
  33. }