Bad output when used as a template tag on strings that contain an escape sequence #33
Open
1 task done
Labels
enhancement
New feature or request
Milestone
Current behaviour
Expected behaviour
Template tag result should be the same as the standard function call result.
Environment
Additional context
I believe this line is the problem:
ansis/src/index.js
Line 43 in 4994864
The "Motivation" section on the
String.cooked
ES proposal explains the issue: https://github.com/tc39/proposal-string-cooked?tab=readme-ov-file#motivationIn other words, I believe it can be fixed by changing to:
String.raw({ raw: arg }, ...values)
(without the newline replacement hack)Appreciation for the useful project
The text was updated successfully, but these errors were encountered: