Skip to content

Commit ddf91ad

Browse files
Fix comment indent issue
1 parent 044b635 commit ddf91ad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/eft-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const eftParser = (template) => {
6060
let { depth, content } = getDepth(lines[i])
6161

6262
if (content) {
63-
if (depth < minDepth || depth - prevDepth > 1 || (depth - prevDepth === 1 && ['comment', 'tag'].indexOf(prevType) === -1) || (depth === minDepth && topExists)) throw new SyntaxError(getErrorMsg(`Indent grater than ${minDepth - 1} and less than ${prevDepth + 2} expected, but got ${depth}`, i))
63+
if (depth < minDepth || depth - prevDepth > 1 || (depth - prevDepth === 1 && ['comment', 'tag'].indexOf(prevType) === -1) || (prevType !== 'comment' && depth === minDepth && topExists)) throw new SyntaxError(getErrorMsg(`Indent grater than ${minDepth - 1} and less than ${prevDepth + 2} expected, but got ${depth}`, i))
6464
const type = content[0]
6565
content = content.slice(1)
6666
if (!topExists && typeSymbols.indexOf(type) >= 0 && type !== '>') throw new SyntaxError(getErrorMsg('No top level entry', i))

0 commit comments

Comments
 (0)