mirror of
https://github.com/Hopiu/lychee.git
synced 2026-03-27 18:00:24 +00:00
Skipping URLs in verbatim elements didn't take nested elements into consideration, which were not verbatim. For instance, the following HTML snippet would yield `https://example.com` in non-verbatim mode, even if it is nested inside a verbatim `<pre>` element: ```html <pre><a href="https://example.com">link</a></pre> ``` This commit fixes the behavior for both `html5gum` and `html5ever`. Note that nested verbatim elements of the same kind still are not handled correctly. For instance, the following HTML snippet would still yield `https://example.com`: ```html <pre> <pre></pre> <a href="https://example.com">link</a> </pre> ``` The reason is that we currently only keep track of a single verbatim element and not a stack of elements, which we would need to unwind and resolve the situation. Fixes https://github.com/lycheeverse/lychee/issues/986. |
||
|---|---|---|
| .. | ||
| bench | ||
| cache | ||
| cache_accept_custom_status_codes | ||
| configs | ||
| exclude-path | ||
| ignore | ||
| offline | ||
| TEST.html | ||
| TEST.md | ||
| TEST_ALL_PRIVATE.md | ||
| TEST_CODE_BLOCKS.md | ||
| TEST_DATA_URIS.html | ||
| TEST_DUMP_EXCLUDE.txt | ||
| TEST_EMAIL.md | ||
| TEST_EMAIL_QUERY_PARAMS.html | ||
| TEST_EMAIL_QUERY_PARAMS.md | ||
| TEST_EXAMPLE_DOMAINS.md | ||
| TEST_EXCLUDE_1.txt | ||
| TEST_EXCLUDE_2.txt | ||
| TEST_GITHUB.md | ||
| TEST_GITHUB_404.md | ||
| TEST_HTML5.html | ||
| TEST_HTML5_CUSTOM_ELEMENTS.html | ||
| TEST_HTML5_LOWERCASE_DOCTYPE.html | ||
| TEST_HTML5_MALFORMED_LINKS.html | ||
| TEST_HTML5_MINIFIED.html | ||
| TEST_HTTP.html | ||
| TEST_REPETITION_1.txt | ||
| TEST_REPETITION_2.txt | ||
| TEST_SCHEMES.md | ||
| TEST_SCHEMES.txt | ||
| TEST_VERBATIM.html | ||