+
content
+
+ `,
+ output: `
+
+
+content
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
+ line: 5,
+ column: 12,
+ nodeType: 'HTMLTagClose',
+ endLine: 5,
+ endColumn: 12
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but no line breaks found.',
+ line: 5,
+ column: 19,
+ nodeType: 'HTMLEndTagOpen',
+ endLine: 5,
+ endColumn: 19
+ }
+ ]
+ },
+ {
+ code: `
+
+ content
+
+ `,
+ options: [{
+ singleline: 'always',
+ multiline: 'never'
+ }],
+ output: `
+
+
+content
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 30,
+ nodeType: 'HTMLTagClose',
+ endLine: 3,
+ endColumn: 30
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 37,
+ nodeType: 'HTMLEndTagOpen',
+ endLine: 3,
+ endColumn: 37
+ }
+ ]
+ },
+ {
+ code: `
+
+ content
+
+ `,
+ options: [{
+ singleline: 'always',
+ multiline: 'never'
+ }],
+ output: `
+
content
+ `,
+ errors: [
+ {
+ message: 'Expected no line breaks after closing bracket of the "div" element, but 1 line break found.',
+ line: 4,
+ column: 12,
+ nodeType: 'HTMLTagClose',
+ endLine: 5,
+ endColumn: 13
+ },
+ {
+ message: 'Expected no line breaks before opening bracket of the "div" element, but 1 line break found.',
+ line: 5,
+ column: 20,
+ nodeType: 'HTMLEndTagOpen',
+ endLine: 6,
+ endColumn: 11
+ }
+ ]
+ },
+ // comments
+ {
+ code: `
+
+
+
+ `,
+ options: [{
+ singleline: 'always'
+ }],
+ output: `
+
+
+
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 16
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 30
+ }
+ ]
+ },
+ {
+ code: `
+
+
+
+
+
+ `,
+ options: [{
+ singleline: 'never'
+ }],
+ output: `
+
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected no line breaks after closing bracket of the "div" element, but 1 line break found.',
+ line: 3,
+ column: 16
+
+ },
+ {
+ message: 'Expected no line breaks before opening bracket of the "div" element, but 1 line break found.',
+ line: 4,
+ column: 25
+
+ }
+ ]
+ },
+ // one error
+ {
+ code: `
+
+ content
+
+
+ `,
+ options: [{
+ singleline: 'always'
+ }],
+ output: `
+
+
+content
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 16
+ }
+ ]
+ },
+ {
+ code: `
+
+
+ content
+
+ `,
+ options: [{
+ singleline: 'always'
+ }],
+ output: `
+
+
+ content
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but no line breaks found.',
+ line: 4,
+ column: 18
+ }
+ ]
+ },
+ {
+ code: `
+
content
+
+ `,
+ options: [{
+ singleline: 'never',
+ multiline: 'ignore'
+ }],
+ output: `
+
content
+ `,
+ errors: [{
+ message: 'Expected no line breaks before opening bracket of the "div" element, but 1 line break found.',
+ line: 2,
+ column: 31 }]
+ },
+ {
+ code: `
+
+ content
+ `,
+ options: [{
+ singleline: 'never',
+ multiline: 'ignore'
+ }],
+ output: `
+
content
+ `,
+ errors: [{
+ message: 'Expected no line breaks after closing bracket of the "div" element, but 1 line break found.',
+ line: 2,
+ column: 24
+ }]
+ },
+ // multiline content
+ {
+ code: `
+
content
content
+ content
content
+ `,
+ options: [{
+ singleline: 'never'
+ }],
+ output: `
+
+
+content
+content
+ content
+
content
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break after closing bracket of the "template" element, but no line breaks found.',
+ line: 2,
+ column: 19
+ },
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
+ line: 2,
+ column: 24
+ },
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
+ line: 2,
+ column: 36
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 16
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 29
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "template" element, but no line breaks found.',
+ line: 3,
+ column: 35
+ }
+ ]
+ },
+ // empty
+ {
+ code: `
+
+
+
+ `,
+ options: [{
+ singleline: 'always'
+ }],
+ output: `
+
+
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 16
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 16
+ }
+ ]
+ },
+ {
+ code: `
+
+
+ `,
+ options: [{
+ singleline: 'never',
+ multiline: 'ignore'
+ }],
+ output: `
+
+ `,
+ errors: [
+ {
+ message: 'Expected no line breaks after closing bracket of the "div" element, but 1 line break found.',
+ line: 2,
+ column: 24
+ },
+ {
+ message: 'Expected no line breaks before opening bracket of the "div" element, but 1 line break found.',
+ line: 2,
+ column: 24
+
+ }
+ ]
+ },
+ // multi line breaks
+ {
+ code: `
+
+
+
+ content
+
+
+
+ `,
+ options: [{
+ singleline: 'always'
+ }],
+ output: `
+
+
+content
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but 2 line breaks found.',
+ line: 3,
+ column: 16
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but 2 line breaks found.',
+ line: 5,
+ column: 20
+ }
+ ]
+ },
+ // mustache
+ {
+ code: `
+
+ {{content}}
+
+ `,
+ options: [{
+ singleline: 'always'
+ }],
+ output: `
+
+
+{{content}}
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 16
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 27
+ }
+ ]
+ },
+ // multiline end tag
+ {
+ code: `
+
+ content
+
+ `,
+ output: `
+
+
+content
+
+
+ `,
+ errors: [
+ {
+ message: 'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 16
+ },
+ {
+ message: 'Expected 1 line break before opening bracket of the "div" element, but no line breaks found.',
+ line: 3,
+ column: 23
+ }]
+ }
+ ]
+})