Vue: Error compiling long string litteral (many + on many lines)

Created on 13 Oct 2019  ·  1Comment  ·  Source: vuejs/vue

Version

2.6.10

Reproduction link

https://codesandbox.io/embed/vue-template-ysl83

Steps to reproduce

Just click the link and you see the error and start editing.
Go to the second of the component and you see a red line (line no 24?)
It says that the string literal is not correct, but its because it loads just a piece of it.

What is expected?

No compilation error

What is actually happening?

A compilation error

bug has workaround

Most helpful comment

it seems that the </script> string makes the SFC parser stop earlier than it should.
As a workaround you can escape the slash <\/script>

>All comments

it seems that the </script> string makes the SFC parser stop earlier than it should.
As a workaround you can escape the slash <\/script>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seemsindie picture seemsindie  ·  3Comments

franciscolourenco picture franciscolourenco  ·  3Comments

gkiely picture gkiely  ·  3Comments

guan6 picture guan6  ·  3Comments

wufeng87 picture wufeng87  ·  3Comments