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

bfis picture bfis  路  3Comments

hiendv picture hiendv  路  3Comments

wufeng87 picture wufeng87  路  3Comments

seemsindie picture seemsindie  路  3Comments

robertleeplummerjr picture robertleeplummerjr  路  3Comments