fix(transformer): don't ignore the entity after a stray '&'#13554
fix(transformer): don't ignore the entity after a stray '&'#13554overlookmotel merged 1 commit intooxc-project:mainfrom
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug in the JSX entity decoder where stray ampersands (&) would interfere with proper entity decoding. The issue occurred when an input like & & was incorrectly treated as a single entity instead of a stray & followed by a valid & entity.
- Updates the entity decoder to reset the start index when encountering another
&before finding a; - Adds a test case to verify the fix for the stray ampersand scenario
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
8e21367 to
7f7be0d
Compare
There was a problem hiding this comment.
Thank you for tackling this. Sorry that Copilot called your elegant solution into question!
Note: Boshen assigned Dunqing to this issue, but Dunqing and I had already discussed the other day. As I was the last to touch this code, I said I'd look at it first.
CodSpeed Instrumentation Performance ReportMerging #13554 will not alter performanceComparing Summary
Footnotes |
|
Thank you all for addressing this so quickly! |
Fixes #13546 Currently, an input like `& &`, which should be transformed into `& &`, is incorrectly treated as a single entity. As a result, the output becomes `& &`. This PR fixes the issue by resetting the start index when the decoder encounters another `&` before a `;`.
Fixes #13546
Currently, an input like
& &, which should be transformed into& &, is incorrectly treated as a single entity. As a result, the output becomes& &.This PR fixes the issue by resetting the start index when the decoder encounters another
&before a;.