Skip to content

make rustdoc::invalid_html_tags more robust #145535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lolbinarycat
Copy link
Contributor

@lolbinarycat lolbinarycat commented Aug 17, 2025

best reviewed a commit at a time.

first commit eliminates a false negative, second commit eliminates a false positive.

for some reason, pulldown-cmark splits html blocks into their constituent lines, so we just coalesce the iterator to recombine these.. this approach might eliminate other bugs if we did it elsewhere, but i'm not sure what or where.

fixes #145529

previously, this lint did not distinguish between `<img` and `<img>`,
and since the latter should be accepted under html5,
the former was also accepted.
@rustbot
Copy link
Collaborator

rustbot commented Aug 17, 2025

r? @notriddle

rustbot has assigned @notriddle.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 17, 2025
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the rustdoc-invalid_html_tags-svg-145529 branch from f2456a7 to adf1e7d Compare August 17, 2025 18:27
@rustbot
Copy link
Collaborator

rustbot commented Aug 17, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@klensy
Copy link
Contributor

klensy commented Aug 17, 2025

pulldown-cmark splits html blocks

Used pulldown-cmark is slightly old for reasons, this can be changed in more recent versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Self-closing elements spanning multiple lines emit warnings
5 participants