mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2026-11-02 02:17:33 +08:00
s:AdjustBlockIndent() had `let block = a:block` without such an argument, so GetVueIndent() hit E121 for every line in template, script and style. It was hidden as errors in 'indentexpr' are silent and the function goes on, but showed up when calling GetVueIndent() directly. Also return [0, 0] in s:PrevMultilineEmptyTag() when no tag start is found, instead of no value. Add ExpectIndentEachLine() for tests to call GetVueIndent() for each line and check the result.
25 lines
236 B
Vue
25 lines
236 B
Vue
<template>
|
|
<div
|
|
class="a"
|
|
>
|
|
<input
|
|
type="text"
|
|
>
|
|
<p :class="{ a: b }">x</p>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return { a: 1 }
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
p {
|
|
color: red;
|
|
}
|
|
</style>
|