-
Notifications
You must be signed in to change notification settings - Fork 32
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
preserve escape characters #222
base: master
Are you sure you want to change the base?
Conversation
test('string-mixed-line-endings', () => { | ||
let input = '{{foo-bar placeholder="Choose a... \\t\\r\\n"}}'; | ||
|
||
expect(runTest('string-mixed-line-endings.hbs', input)).toMatch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Turbo87 I had to change to toMatch
from toMatchInlineSnapshot
because toMatchInlineSnapshot
runs prettier not allowing me to express the string correctly for the test. I
|
||
if (_value.chars && _value.chars.length > 0) { | ||
_value.chars = JSON.stringify(_value.chars).slice(1, -1); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this. What are we stringifying something here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't that a bug in the printer or template-recast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn’t consider that. I guess I could check how other parsers handle such things. I’ll look into this a little more.
fixes #219