Allow HTML comments on first line (#9760)

This commit is contained in:
Daniel Tschinder
2019-03-25 14:22:57 -07:00
committed by GitHub
parent 3aaafae053
commit aaefc83a6c
3 changed files with 107 additions and 1 deletions

View File

@@ -0,0 +1 @@
/**/ --> comment

View File

@@ -0,0 +1,102 @@
{
"type": "File",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"program": {
"type": "Program",
"start": 0,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 16
}
},
"sourceType": "script",
"interpreter": null,
"body": [],
"directives": [],
"innerComments": [
{
"type": "CommentBlock",
"value": "",
"start": 0,
"end": 4,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 4
}
}
},
{
"type": "CommentLine",
"value": " comment",
"start": 5,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 16
}
}
}
]
},
"comments": [
{
"type": "CommentBlock",
"value": "",
"start": 0,
"end": 4,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 4
}
}
},
{
"type": "CommentLine",
"value": " comment",
"start": 5,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 16
}
}
}
]
}