Repository navigation
Conversation
mre
reviewed
Nov 8, 2026
mre
left a comment
Member
There was a problem hiding this comment.
Done with my review. Added a few comments.
Thanks for pointing out LLM usage.
Can we add a test for that new behavior somehow?
Comment on lines
+28
to
+30
| // The column on the first line of the input is only meaningful if the input started at | ||
| // the beginning of a line. | ||
| if span.line.get() == 1 && !self.at_line_start { |
Comment on lines
+65
to
+68
| let at_line_start = self.at_line_start.replace(match &token { | ||
| Token::CharacterTokens(raw) => raw.ends_with('\n'), | ||
| _ => false, | ||
| }); |
Member
There was a problem hiding this comment.
I find this easier to read if the bool is defined in its own line:
// A token starts at the beginning of a line only if the preceding token
// was character data ending in a newline. For all other token types,
// the starting column of the next token is unknown.
let next_at_line_start = matches!(
&token,
Token::CharacterTokens(raw) if raw.ends_with('\n')
);
let at_line_start = self.at_line_start.replace(next_at_line_start);Current URI parsing does not process correcty cases when Token::CharacterTokens contains several URI's separated by \n which is tested by `test_include_verbatim`. Those cases can be encountered on non-SIMD path of html5ever.
k0tran
force-pushed
the
fix-html5ever-verbatim
branch
from
November 13, 2026 14:51
4ccb98e to
098c375
Compare
Author
|
The requested change implemented. Test added. Verified that regardless of SIMD before the fixing commit it breaks and after that commit passes. |
Author
|
Hmm forgot to run clippy, one sec |
k0tran
force-pushed
the
fix-html5ever-verbatim
branch
from
November 13, 2026 15:19
5f4f6fe to
2dab8ad
Compare
Author
|
Oh, I get it, I changed the formatting inside HTML_INPUT and it broke the test. |
html5ever character tokens can span multiple lines. Verify that a URI on the first line of a token starting at the beginning of a line keeps its column.
k0tran
force-pushed
the
fix-html5ever-verbatim
branch
from
November 13, 2026 15:57
2dab8ad to
5f69a31
Compare
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.
PR as per requested in #2263 (comment)
Note that it is not covered by tests unless SIMD is disabled inside html5ever or built on a target that html5ever does not have support SIMD for. When developing the primary goal was set of minimal changes to build lychee on riscv64 and loongarch64.
Also, this patch is LLM-assisted. I tried my best to review as thorough as possible and ran another context-less instance for code review.