-
Notifications
You must be signed in to change notification settings - Fork 6
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
dedents when it shouldn't #3
Comments
Looking at the code, I see that lines that have no indentation are ignored. It is not explicitly mentioned in the readme but I guess it makes sense, otherwise |
I've created a fix and PR. I'm using this internal to a yaml template tag function. Naturally YAML is very indent focused but the function doesn't know ahead of time if a dedent needs to occur before parsing the string to a JavaScript object. |
Should
|
Also Github reports that there are over 18 thousand repositories using this package. It is irresponsible to leave this awful quirk in the code. |
A possible workaround is to add a space at the begging of each line dedent(text.replace(/(^[^\n]|\n)/g, '$1 ')) |
I think the issue here is you might be using |
becomes
one: two: 3
The text was updated successfully, but these errors were encountered: