File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { compareFiles } from 'tests/common' ;
2+ import { describe , expect , it } from 'vitest' ;
3+
4+ describe ( 'Comments' , ( ) => {
5+ it ( 'should handle comments' , ( ) => {
6+ const { actual, expected } = compareFiles ( __dirname , {
7+ formatOptions : { pugCommentPreserveSpaces : 'trim-all' } ,
8+ } ) ;
9+ expect ( actual ) . toBe ( expected ) ;
10+ } ) ;
11+ } ) ;
Original file line number Diff line number Diff line change 1+ // just some paragraphs
2+ p foo
3+ p bar
4+ //- will not output within markup
5+ p foo
6+ p bar
7+ div
8+ //-
9+ Comments for your template writers.
10+ Use as much text as you want.
11+ //
12+ Comments for your HTML readers.
13+ Use as much text as you want.
14+ div
15+ //- Indented comment
16+ span Test
17+ // Indented comment
18+ span Test
19+
20+ //- Indented comment
21+ span Test
Original file line number Diff line number Diff line change 1+ // just some paragraphs
2+ p foo
3+ p bar
4+ //- will not output within markup
5+ p foo
6+ p bar
7+ div
8+ //-
9+ Comments for your template writers.
10+ Use as much text as you want.
11+ //
12+ Comments for your HTML readers.
13+ Use as much text as you want.
14+ div
15+ //- Indented comment
16+ span Test
17+ // Indented comment
18+ span Test
19+
20+
21+
22+ //- Indented comment
23+ span Test
You can’t perform that action at this time.
0 commit comments