This fixes an issue with HTML tags inside the <script> tag. Remex also doesn't throw errors on attributes like @click, although it does mangle them when producing DOM. To work around this, don't use DOM serialization for the template HTML, but parse everything again using a Remex parse+serialize pipeline that extracts the template and (optionally) removes comments and strips whitespace. One important effect of this change is that we'll have to forbid self-closing tags in Vue templates, because Remex doesn't handle those correctly (or rather, handles them *too* correctly). But on the up side, we can now allow shorthands for v-bind/v-on/v-slot again. Bug: T253334 Bug: T255587 Depends-On: I2253a2317187fe0d781ba5bfefab95e0f97d0a80 Change-Id: Id9a9728b7163601cc60bc587be07b70977d41970
19 lines
333 B
Text
19 lines
333 B
Text
module.exports = {
|
|
data: function () {
|
|
return {
|
|
hello: 'world'
|
|
};
|
|
}
|
|
};;
|
|
module.exports.template = "<!-- Outer comment --> \
|
|
<div class=\"mw-vue-test\"> \
|
|
<!-- \
|
|
Inner comment \
|
|
with multiple lines \
|
|
and tabs \
|
|
--> \
|
|
<p>Hello\\n<\/p> \
|
|
<p>{{ hello }}<\/p> \
|
|
<pre> foo\\\n bar \
|
|
<\/pre> \
|
|
<\/div>";
|