Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/markdown_it/presets/zero.py: 100%
3 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-07 06:15 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-07 06:15 +0000
1"""
2"Zero" preset, with nothing enabled. Useful for manual configuring of simple
3modes. For example, to parse bold/italic only.
4"""
5from ..utils import PresetType
8def make() -> PresetType:
9 return {
10 "options": {
11 "maxNesting": 20, # Internal protection, recursion limit
12 "html": False, # Enable HTML tags in source
13 # this is just a shorthand for .disable(["html_inline", "html_block"])
14 # used by the linkify rule:
15 "linkify": False, # autoconvert URL-like texts to links
16 # used by the replacements and smartquotes rules:
17 # Enable some language-neutral replacements + quotes beautification
18 "typographer": False,
19 # used by the smartquotes rule:
20 # Double + single quotes replacement pairs, when typographer enabled,
21 # and smartquotes on. Could be either a String or an Array.
22 # For example, you can use '«»„“' for Russian, '„“‚‘' for German,
23 # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
24 "quotes": "\u201c\u201d\u2018\u2019", # /* “”‘’ */
25 # Renderer specific; these options are used directly in the HTML renderer
26 "xhtmlOut": False, # Use '/' to close single tags (<br />)
27 "breaks": False, # Convert '\n' in paragraphs into <br>
28 "langPrefix": "language-", # CSS language prefix for fenced blocks
29 # Highlighter function. Should return escaped HTML,
30 # or '' if the source string is not changed and should be escaped externally.
31 # If result starts with <pre... internal wrapper is skipped.
32 # function (/*str, lang, attrs*/) { return ''; }
33 "highlight": None,
34 },
35 "components": {
36 "core": {"rules": ["normalize", "block", "inline", "text_join"]},
37 "block": {"rules": ["paragraph"]},
38 "inline": {
39 "rules": ["text"],
40 "rules2": ["balance_pairs", "fragments_join"],
41 },
42 },
43 }