microsoft / microsoft/TypeScript-TmLanguage
HTML comments are not considered comments
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 471
- Forks
- 149
- PR merge metrics
- No merged PRs in 30d
Description
In JavaScript, HTML comments are a valid replacement for single line comments.
They are considered comments in Node.js, inline script tags, external js file, etc.
<!-- No comment.
// Comment.
Even GitHub doesn't seem to understand this syntax 🤔
Your grammar does not seem to support them, and mistakes them as a syntax error.
Link to the relevant part of the spec
In the spec this syntax appears under additional syntax for web browsers, yet you do support the other additional syntax in that section, such as legacy octal numeric literals and octal string escapes, but not HTML comments.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TypeScript TextMate grammar rules for JavaScript comments and compare them with the ECMAScript HTML-like comments section linked in the issue. Verify the grammar against the shown HTML-comment example and confirm that it is no longer reported as a syntax error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100