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

Function test_ref_definitions

tests/test_port/test_references.py:4–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3
4def test_ref_definitions():
5 md = MarkdownIt()
6 src = "[a]: abc\n\n[b]: xyz\n\n[b]: ijk"
7 env = {} # type: ignore
8 tokens = md.parse(src, env)
9 assert tokens == []
10 assert env == {
11 "references": {
12 "A": {"title": "", "href": "abc", "map": [0, 1]},
13 "B": {"title": "", "href": "xyz", "map": [2, 3]},
14 },
15 "duplicate_refs": [{"href": "ijk", "label": "B", "map": [4, 5], "title": ""}],
16 }
17
18
19def test_use_existing_env(data_regression):

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
MarkdownItClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…