Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/markdown_it/presets/commonmark.py: 100%
2 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-07 06:07 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-07 06:07 +0000
1"""Commonmark default options.
3This differs to presets.default,
4primarily in that it allows HTML and does not enable components:
6- block: table
7- inline: strikethrough
8"""
11def make():
12 return {
13 "options": {
14 "maxNesting": 20, # Internal protection, recursion limit
15 "html": True, # Enable HTML tags in source,
16 # this is just a shorthand for .enable(["html_inline", "html_block"])
17 # used by the linkify rule:
18 "linkify": False, # autoconvert URL-like texts to links
19 # used by the replacements and smartquotes rules
20 # Enable some language-neutral replacements + quotes beautification
21 "typographer": False,
22 # used by the smartquotes rule:
23 # Double + single quotes replacement pairs, when typographer enabled,
24 # and smartquotes on. Could be either a String or an Array.
25 #
26 # For example, you can use '«»„“' for Russian, '„“‚‘' for German,
27 # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
28 "quotes": "\u201c\u201d\u2018\u2019", # /* “”‘’ */
29 # Renderer specific; these options are used directly in the HTML renderer
30 "xhtmlOut": True, # Use '/' to close single tags (<br />)
31 "breaks": False, # Convert '\n' in paragraphs into <br>
32 "langPrefix": "language-", # CSS language prefix for fenced blocks
33 # Highlighter function. Should return escaped HTML,
34 # or '' if the source string is not changed and should be escaped externally.
35 # If result starts with <pre... internal wrapper is skipped.
36 #
37 # function (/*str, lang, attrs*/) { return ''; }
38 #
39 "highlight": None,
40 },
41 "components": {
42 "core": {"rules": ["normalize", "block", "inline"]},
43 "block": {
44 "rules": [
45 "blockquote",
46 "code",
47 "fence",
48 "heading",
49 "hr",
50 "html_block",
51 "lheading",
52 "list",
53 "reference",
54 "paragraph",
55 ]
56 },
57 "inline": {
58 "rules": [
59 "autolink",
60 "backticks",
61 "emphasis",
62 "entity",
63 "escape",
64 "html_inline",
65 "image",
66 "link",
67 "newline",
68 "text",
69 ],
70 "rules2": ["balance_pairs", "emphasis", "text_collapse"],
71 },
72 },
73 }