@@ -269,7 +269,7 @@ tester.run('html-indent', rule, loadPatterns(
269
269
} ]
270
270
} ,
271
271
272
- // Pre
272
+ // Pre, Textarea
273
273
{
274
274
filename : 'test.vue' ,
275
275
code : unIndent `
@@ -282,6 +282,18 @@ tester.run('html-indent', rule, loadPatterns(
282
282
</template>
283
283
`
284
284
} ,
285
+ {
286
+ filename : 'test.vue' ,
287
+ code : unIndent `
288
+ <template>
289
+ <textarea>
290
+ aaa
291
+ bbb
292
+ ccc
293
+ </textarea>
294
+ </template>
295
+ `
296
+ } ,
285
297
{
286
298
filename : 'test.vue' ,
287
299
code : unIndent `
@@ -327,6 +339,17 @@ tester.run('html-indent', rule, loadPatterns(
327
339
</template>
328
340
`
329
341
} ,
342
+ {
343
+ filename : 'test.vue' ,
344
+ code : unIndent `
345
+ <template>
346
+ <div><textarea>aaa
347
+ bbb ccc
348
+ ddd
349
+ fff</textarea></div>
350
+ </template>
351
+ `
352
+ } ,
330
353
{
331
354
filename : 'test.vue' ,
332
355
code : unIndent `
@@ -619,7 +642,7 @@ tester.run('html-indent', rule, loadPatterns(
619
642
]
620
643
} ,
621
644
622
- // Pre
645
+ // Pre, Textarea
623
646
{
624
647
filename : 'test.vue' ,
625
648
code : unIndent `
@@ -668,19 +691,61 @@ tester.run('html-indent', rule, loadPatterns(
668
691
</template>
669
692
` ,
670
693
output : unIndent `
671
- <template>
672
- <pre
673
- :class="[
674
- 'a',
675
- 'b',
676
- 'c'
677
- ]"
694
+ <template>
695
+ <pre
696
+ :class="[
697
+ 'a',
698
+ 'b',
699
+ 'c'
700
+ ]"
701
+ >
702
+ aaa
703
+ bbb
704
+ ccc
705
+ </pre>
706
+ </template>
707
+ ` ,
708
+ errors : [
709
+ { message : 'Expected indentation of 2 spaces but found 0 spaces.' , line : 2 } ,
710
+ { message : 'Expected indentation of 4 spaces but found 0 spaces.' , line : 3 } ,
711
+ { message : 'Expected indentation of 6 spaces but found 0 spaces.' , line : 4 } ,
712
+ { message : 'Expected indentation of 6 spaces but found 0 spaces.' , line : 5 } ,
713
+ { message : 'Expected indentation of 6 spaces but found 0 spaces.' , line : 6 } ,
714
+ { message : 'Expected indentation of 4 spaces but found 0 spaces.' , line : 7 } ,
715
+ { message : 'Expected indentation of 2 spaces but found 0 spaces.' , line : 8 }
716
+ ]
717
+ } ,
718
+ {
719
+ filename : 'test.vue' ,
720
+ code : unIndent `
721
+ <template>
722
+ <textarea
723
+ :class="[
724
+ 'a',
725
+ 'b',
726
+ 'c'
727
+ ]"
678
728
>
679
- aaa
680
- bbb
681
- ccc
682
- </pre>
683
- </template>
729
+ aaa
730
+ bbb
731
+ ccc
732
+ </textarea>
733
+ </template>
734
+ ` ,
735
+ output : unIndent `
736
+ <template>
737
+ <textarea
738
+ :class="[
739
+ 'a',
740
+ 'b',
741
+ 'c'
742
+ ]"
743
+ >
744
+ aaa
745
+ bbb
746
+ ccc
747
+ </textarea>
748
+ </template>
684
749
` ,
685
750
errors : [
686
751
{ message : 'Expected indentation of 2 spaces but found 0 spaces.' , line : 2 } ,
0 commit comments