Skip to content

Fix invalid HTML comments #334

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

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

amartini51
Copy link
Member

The line "---" indicated to the pre-DocC build system's code testing infrastructure that the code listing contains a blank line at that point. However, two hyphens in a row is invalid inside of an HTML style comment.

Fixes: rdar://136551557

The line "---" indicated to the pre-DocC build system's code testing
infrastructure that the code listing contains a blank line at that
point.  However, two hyphens in a row is invalid inside of an HTML
<!-- --> style comment.

Changed to blank lines because that was another way to spell the same
thing in the old test system (although it might have been fragile, and
was less used), but more importantly we're unlikely to use the old test
system again.  These test expectation lines were preserved during the
export to assist writing new expectation markup in some future testing
system.

Bulk edit via:

    sed -i .bak -e 's/^ *--- *$//' TSPL.docc/*/*.md

Confirmed no change to the Render JSON from DocC.
@amartini51
Copy link
Member Author

Reviewed with & approved by Robert Olsen offline.

Made a note to check for any other -- in comments, which are invalid but aren't fixed by this PR.

@amartini51 amartini51 merged commit 1b663f7 into swiftlang:main Dec 4, 2024
@amartini51 amartini51 deleted the html_comments branch December 4, 2024 21:34
amartini51 added a commit to amartini51/swift-book that referenced this pull request Jan 28, 2025
Re-applied the changes from commit 1b663f7 (Fix invalid HTML comments
(swiftlang#334), 2024-12-04) -- which landed on 'main' after this branch diverged
-- to the new location for that content.

Reviewed this branch's changes, before and after this merge, as follows:

    opendiff =(git diff main...b6439e7) =(git diff main...HEAD)

References: 1b663f7
References: b6439e7
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.

1 participant