Skip to content
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

Fix line terminators in template strings #3641

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

raskad
Copy link
Member

@raskad raskad commented Feb 1, 2024

This PR fixes some issues with different line terminators in templates strings.

The issues where caused by some unhandled line terminators in raw strings and double handling by Cursor of the string codepoints in the cooked strings.

@raskad raskad added bug Something isn't working parser Issues surrounding the parser labels Feb 1, 2024
@raskad raskad added this to the v0.18.0 milestone Feb 1, 2024
@raskad raskad requested a review from a team February 1, 2024 03:13
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 56 lines in your changes are missing coverage. Please review.

Comparison is base (39ba999) 47.38% compared to head (b67c40f) 47.24%.
Report is 5 commits behind head on main.

Files Patch % Lines
core/parser/src/lexer/template.rs 46.05% 41 Missing ⚠️
core/parser/src/parser/expression/primary/mod.rs 20.00% 8 Missing ⚠️
...rser/src/parser/expression/primary/template/mod.rs 25.00% 6 Missing ⚠️
core/parser/src/lexer/token.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3641      +/-   ##
==========================================
- Coverage   47.38%   47.24%   -0.15%     
==========================================
  Files         476      476              
  Lines       46617    46892     +275     
==========================================
+ Hits        22090    22154      +64     
- Misses      24527    24738     +211     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Feb 1, 2024

Test262 conformance changes

Test result main count PR count difference
Total 96,310 96,310 0
Passed 80,280 80,286 +6
Ignored 4,217 4,217 0
Failed 11,813 11,807 -6
Panics 0 0 0
Conformance 83.36% 83.36% +0.01%
Fixed tests (6):
test/built-ins/String/raw/special-characters.js [strict mode] (previously Failed)
test/built-ins/String/raw/special-characters.js (previously Failed)
test/language/expressions/template-literal/tv-line-terminator-sequence.js [strict mode] (previously Failed)
test/language/expressions/template-literal/tv-line-terminator-sequence.js (previously Failed)
test/language/expressions/template-literal/tv-line-continuation.js [strict mode] (previously Failed)
test/language/expressions/template-literal/tv-line-continuation.js (previously Failed)

Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! :)

@HalidOdat HalidOdat requested a review from a team February 1, 2024 08:41
@jedel1043 jedel1043 added this pull request to the merge queue Feb 1, 2024
Merged via the queue into main with commit 6ddc2b4 Feb 1, 2024
14 checks passed
@raskad raskad deleted the fix-template-line-terminator branch February 1, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants