@html-eslint/parser
Advanced tools
Comparing version 0.13.1 to 0.13.2
@@ -24,7 +24,7 @@ function setNodeLocAndRange(node, sourceCodeLocation) { | ||
line: startLine, | ||
column: startCol, | ||
column: startCol -1, | ||
}, | ||
end: { | ||
line: endLine, | ||
column: endCol, | ||
column: endCol - 1, | ||
}, | ||
@@ -31,0 +31,0 @@ }; |
@@ -57,28 +57,24 @@ function canIncludeChild(node) { | ||
let line = locNode.loc.start.line; | ||
const startCol = locNode.loc.start.column; | ||
return text.split("\n").map((textLine) => { | ||
const lengthWithoutIndent = textLine.trimStart().length; | ||
const indentLength = textLine.length - lengthWithoutIndent; | ||
start += indentLength; | ||
return text.split("\n").map((textLine, index) => { | ||
const columnStart = index === 0 ? startCol : 0; | ||
const node = { | ||
textLine, | ||
start, | ||
end: start + lengthWithoutIndent, | ||
range: [start, start + lengthWithoutIndent], | ||
end: start + textLine.length, | ||
range: [start, start + textLine.length], | ||
loc: { | ||
start: { | ||
line, | ||
column: indentLength + 1, | ||
column: columnStart, | ||
}, | ||
end: { | ||
line, | ||
column: textLine.length + 1, | ||
column: columnStart + textLine.length, | ||
}, | ||
}, | ||
}; | ||
start += (textLine.length + 1); | ||
line += 1; | ||
start += lengthWithoutIndent + 1; | ||
@@ -85,0 +81,0 @@ return node; |
@@ -111,7 +111,6 @@ "use strict"; | ||
//NOTE: all U+000D CARRIAGE RETURN (CR) characters must be converted to U+000A LINE FEED (LF) characters. | ||
// Following LINE FEED (LF) is not ignored to keep index intact. | ||
if (cp === $.CARRIAGE_RETURN) { | ||
this.skipNextNewLine = true; | ||
return $.LINE_FEED; | ||
return $.CARRIAGE_RETURN; | ||
} | ||
@@ -118,0 +117,0 @@ |
{ | ||
"name": "@html-eslint/parser", | ||
"version": "0.13.1", | ||
"version": "0.13.2", | ||
"description": "Parser for @html-eslint/eslint-plugin", | ||
@@ -32,3 +32,3 @@ "author": "yeonjuan", | ||
}, | ||
"gitHead": "1df1923b655563738947e88da159f8f772f94265" | ||
"gitHead": "3f1599284d5725db38e0984ecdcd283a76a530fa" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
372289
26927