Skip to content

Commit 519fa3a

Browse files
mysticateamichalsnik
authored andcommitted
Fix: syntax errors in tests of html-indent
The top-level commas are invalid syntax.
1 parent 84df9ec commit 519fa3a

6 files changed

+12
-12
lines changed

lib/utils/indent-common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ module.exports.defineVisitor = function create (context, tokenStore, defaultOpti
845845
if (node.expression != null && node.range[0] !== node.expression.range[0]) {
846846
const startQuoteToken = tokenStore.getFirstToken(node)
847847
const endQuoteToken = tokenStore.getLastToken(node)
848-
const childToken = tokenStore.getFirstToken(node.expression)
848+
const childToken = tokenStore.getTokenAfter(startQuoteToken)
849849

850850
setOffset(childToken, 1, startQuoteToken)
851851
setOffset(endQuoteToken, 0, startQuoteToken)
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!--{}-->
22
<template>
33
<div
4-
:class="
4+
:class="(
55
a
66
+
77
b,
88
c
99
+
1010
d
11-
"
11+
)"
1212
/>
1313
</template>
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!--{}-->
22
<template>
33
<div
4-
v-bind:a="
4+
v-bind:a="(
55
1
66
,
77
2
88
,
99
3
10-
"
10+
)"
1111
></div>
1212
</template>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!--{}-->
22
<template>
33
<div
4-
v-bind:b="
4+
v-bind:b="(
55
1,
66
2,
77
3
8-
"
8+
)"
99
></div>
1010
</template>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!--{}-->
22
<template>
33
<div
4-
v-bind:c="
4+
v-bind:c="(
55
a +
66
b,
77
2
8-
"
8+
)"
99
></div>
1010
</template>
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--{}-->
22
<template>
3-
{{
3+
{{(
44
a,
55
b,
66
c
7-
}}
8-
</template>
7+
)}}
8+
</template>

0 commit comments

Comments
 (0)