microsoft / microsoft/TypeScript-Sublime-Plugin
Syntax highlighter breaks when return type ends with a number
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 236
- Avg merge
- 21d 13h
- Merged PRs (30d)
- 1
Description
The syntax highlighter completely stops highlighting when the returntype of a (static) method ends with a digit.
eg.
class Vector2 { }
class Vector { }
class Test {
Method_Works() : Vector {
return new Vector();
}
Method_Breaks(): Vector2 {
return new Vector2();
}
static Method_Breaks() : Vector2 {
return new Vector2();
}
}
edit: it even breaks in the GitHub highlighter... But the compiler does accept it
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
Reproduce the issue in the TypeScript syntax highlighter with the provided class and method examples, comparing Vector with Vector2 return types and static methods. Trace the highlighting rule that handles return-type names ending in digits; done means highlighting continues correctly after both Vector2 declarations and their method bodies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100