-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Vue.js mustach not correctly rendered only after indenting root element #8103
Comments
does work with a single space between
does not with no space between them:
|
Why would anyone write their code that way? |
@syntacticsolutions This doesn't matter, fact is it's a bug, right? |
Thanks @DanielSharkov , it should be a bug. The root cause of different behavior with indent is bellow: https://github.com/yyx990803/de-indent/blob/master/index.js#L17-L24
Maybe we should add \r? pattern in the text interpolation regexp: vue/src/compiler/parser/text-parser.js Lines 6 to 13 in 5e3823a
|
Version
2.5.16
Reproduction link
https://codesandbox.io/s/6jnlpno3lw
Steps to reproduce
This issue happens, when the root element is not indented and the mustache is split into several lines.
Only when the root element is indented, the mustache gets rendered correctly.
What also works, is when mustache is put into a single line and the root element is not indented.
What is expected?
The mustache should bind data
What is actually happening?
The mustache gets rendered plain text
Only wanted to prettify my code, so I split the mustache into several lines and removed the indent of the root element.
The text was updated successfully, but these errors were encountered: