Repository navigation
fix: keep cleaned HTML inside list items and strip annotated imports - #90
Merged
Merged
Conversation
- Block tags (`<p>`, `<div>`, `<br>`, ...) turned into a newline at
column 0, so text inside a list item ended the item and split the list.
A tag at the start or end of a line is dropped; a line it starts takes
the content indentation of the list item it continues (outside a list,
no indentation, so it can't become a code block); a mid-line tag breaks
the line onto the item's indentation. List context is computed in one
pass, so large indented HTML stays linear.
- With excludeImports, an import with a trailing comment or an import
attribute (`with { type: 'json' }`) was left in the output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups from reviewing the content-cleaning fixes:
- item\n <p>para</p>) were replaced with a newline at column 0, which ended the list item and split the list. A line that starts with a block tag now takes the content indentation of the list item it continues, and a mid-line tag breaks onto that indentation. Outside a list the indentation is dropped, so indented HTML can't become a code block. 20,000 indented tags clean in about 20 ms.excludeImports, imports with a trailing comment or an import attribute (with { type: 'json' }) were left in the output.tests/test-review-followups.jscovers both. The docs site output is unchanged frommain. On a 3,461-page docs site, the differences are blank lines removed and text inside list items keeping its indentation.