Repository navigation
🧪 test(serialize): expect LF for a double-escaped CR - #2389
Merged
gaborbernat merged 1 commit intoNov 16, 2026
Merged
gaborbernat merged 1 commit into
gaborbernat merged 1 commit into
Conversation
A raw-text CR is written as LF since the serializer folds it (tox-dev#2284), so the double-escape cases with a CR in the script text now expect the LF form.
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.
A raw-text carriage return has been written as a line feed since #2284, because a re-parse folds a raw CR to LF and reads the same whitespace back. Script text that ends inside a double escape with a CR in it now comes out with an LF, and the second end tag still closes the script. The expected output for those inputs still held the CR, so it no longer matched what the serializer writes. 🔁 Once this merges, the expected output matches the serializer again, and a change to that path shows up as a mismatch.
The serializer still decides how many end tags a script needs by reading its text the way a re-parse would. That decision is unchanged, and only the expected form of the carriage-return inputs moves to the line-feed output that the decision already produces.
Nothing changes for callers of
serialize,to_sourceorencode: their output for these inputs has been the line-feed form on main since #2284.Fixes #2386