-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support indented comments outside of a parent tag
- Loading branch information
1 parent
b105718
commit 13a33a3
Showing
4 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"htmljs-parser": minor | ||
--- | ||
|
||
Allow indented javascript style comments that are not under a parent tag in concise mode. |
5 changes: 4 additions & 1 deletion
5
src/__tests__/fixtures/bad-tag-indent/__snapshots__/bad-tag-indent.expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
1╭─ var colors=['red', 'green', 'blue'] | ||
1╭─ // I am indented, and that is OK, but the following is not | ||
│ │ ╰─ comment.value " I am indented, and that is OK, but the following is not" | ||
╰─ ╰─ comment "// I am indented, and that is OK, but the following is not" | ||
2╭─ var colors=['red', 'green', 'blue'] | ||
╰─ ╰─ error(INVALID_INDENTATION:Line has extra indentation at the beginning) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
// I am indented, and that is OK, but the following is not | ||
var colors=['red', 'green', 'blue'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters