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

[vue-template-compiler] Multiline v-model expressions break compilation #9183

Closed
andrew-humu opened this issue Dec 11, 2018 · 1 comment
Closed
Labels

Comments

@andrew-humu
Copy link
Contributor

Version

2.5.19

Reproduction link

https://codesandbox.io/s/88633ym7y0

Steps to reproduce

See below.

What is expected?

<my-input
  propa="a"
  propb="b"
  v-model="
    some.very.long[dynamic]expression
  "
>

This should compile, and behave identically to the single-line version:

<my-input
  propa="a"
  propb="b"
  v-model="some.very.long[dynamic]expression"
>

What is actually happening?

Compilation fails, with an error that looks like this:

SyntaxError: Unterminated string constant (3:142)
    at Parser.pp$4.raise (/node_modules/vue-template-es2015-compiler/buble.js:2610:13)
    at Parser.pp$8.readString (/node_modules/vue-template-es2015-compiler/buble.js:3436:35)
    at Parser.pp$8.getTokenFromCode (/node_modules/vue-template-es2015-compiler/buble.js:3220:17)

Note that this only applies when setting v-model on a custom component (not a string-element, e.g. <input>).

@posva
Copy link
Member

posva commented Dec 11, 2018

@Justineo which PR is solving this?
nvm: #9184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants