|
125 | 125 | " class='bar'>example</a>"), |
126 | 126 | id='html-anchor-single-quote', |
127 | 127 | ), |
128 | | - # HTML Relative Links Adverarial tests: |
| 128 | + # HTML Relative Links Adversarial tests: |
129 | 129 | # (attribute contains >, attribute without value, multiple tag in line) |
130 | 130 | pytest.param( |
131 | 131 | ('<img id="foo" attr="3>2" attr2 src="assets/diagram.png"' |
|
136 | 136 | ('<img id="foo" attr="3>2" attr2 src="../assets/diagram.png"' |
137 | 137 | ' alt="diagram" class="bar" /><img id="foo" attr="3>2"' |
138 | 138 | ' src="../assets/diagram.png" alt="diagram" class="bar" />'), |
139 | | - id='html-image-adverarial-test', |
| 139 | + id='html-image-adversarial-test', |
140 | 140 | ), |
141 | 141 | pytest.param( |
142 | 142 | ('<a id="foo" attr="3>2" attr2 href="badge.png" class="bar">' |
|
147 | 147 | ('<a id="foo" attr="3>2" attr2 href="../badge.png" class="bar">' |
148 | 148 | 'foo</a><a id="foo" attr="3>2" href="../badge.png" class="bar">' |
149 | 149 | 'bar</a>'), |
150 | | - id='html-anchor-adverarial-test', |
| 150 | + id='html-anchor-adversarial-test', |
151 | 151 | ), |
152 | 152 | # HTML Relative Links Adversarial test: img no end slash |
153 | 153 | pytest.param( |
|
362 | 362 | # https://spec.commonmark.org/0.28/#indented-code-blocks |
363 | 363 | id='no-exclude-indented-code-blocks-missing-newline-after', |
364 | 364 | ), |
| 365 | + # Internal anchor in included file |
| 366 | + # https://github.com/mondeja/mkdocs-include-markdown-plugin/issues/266 |
| 367 | + pytest.param( |
| 368 | + 'This is a link to an [internal anchor](#internal-anchor).', |
| 369 | + 'README', |
| 370 | + 'docs/nav.md', |
| 371 | + 'This is a link to an [internal anchor](#internal-anchor).', |
| 372 | + id='internal-anchor', |
| 373 | + ), |
365 | 374 | ), |
366 | 375 | ) |
367 | 376 | def test_rewrite_relative_urls( |
|
0 commit comments