Skip to content

make doctype followed by comment format idempotently - #255

Merged
g-plane merged 3 commits into
g-plane:mainfrom
UnknownPlatypus:fix-doctype-comment-space
Sep 1, 2026
Merged

make doctype followed by comment format idempotently#255
g-plane merged 3 commits into
g-plane:mainfrom
UnknownPlatypus:fix-doctype-comment-space

Conversation

@UnknownPlatypus

Copy link
Copy Markdown
Contributor

Without that, first run does this:

-<!DOCTYPE<!--
+<!DOCTYPE<!---->

and second run

-<!DOCTYPE<!---->
+<!DOCTYPE <!---->

Which makes it not idempotent.

Found using cargo-fuzz which explains the not super realistic yet possible input

  • The pull request description was written manually by me and was not generated by an AI tool or agent.
  • I have read and understood the relevant parts of the existing codebase before making these changes.
  • I have carefully reviewed and understood all code changes, and ensured that they match the style, architecture, and conventions of the existing codebase.
  • I understand that pull requests containing blindly generated or unreviewed AI-generated code may be closed without review.

@netlify

netlify Bot commented Aug 23, 2026

Copy link
Copy Markdown

Deploy Preview for markup-fmt ready!

Name Link
🔨 Latest commit f1f2abd
🔍 Latest deploy log https://app.netlify.com/projects/markup-fmt/deploys/6a9628ec54d013000823ab64
😎 Deploy Preview https://deploy-preview-255--markup-fmt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread markup_fmt/tests/fmt/html/basics/bogus-doctype.html Outdated
@g-plane
g-plane merged commit a0dfae1 into g-plane:main Sep 1, 2026
5 checks passed
g-plane added a commit that referenced this pull request Sep 1, 2026
Co-authored-by: Pig Fang <g-plane@hotmail.com>
@UnknownPlatypus
UnknownPlatypus deleted the fix-doctype-comment-space branch September 1, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants