MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / test_load_presets

Function test_load_presets

tests/test_api/test_main.py:49–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48
49def test_load_presets():
50 md = MarkdownIt("zero")
51 assert md.get_active_rules() == {
52 "block": ["paragraph"],
53 "core": ["normalize", "block", "inline", "text_join"],
54 "inline": ["text"],
55 "inline2": ["balance_pairs", "fragments_join"],
56 }
57 md = MarkdownIt("commonmark")
58 assert md.get_active_rules() == {
59 "core": ["normalize", "block", "inline", "text_join"],
60 "block": [
61 "code",
62 "fence",
63 "blockquote",
64 "hr",
65 "list",
66 "reference",
67 "html_block",
68 "heading",
69 "lheading",
70 "paragraph",
71 ],
72 "inline": [
73 "text",
74 "newline",
75 "escape",
76 "backticks",
77 "emphasis",
78 "link",
79 "image",
80 "autolink",
81 "html_inline",
82 "entity",
83 ],
84 "inline2": ["balance_pairs", "emphasis", "fragments_join"],
85 }
86
87
88def test_override_options():

Callers

nothing calls this directly

Calls 2

get_active_rulesMethod · 0.95
MarkdownItClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…