atom-community / atom-community/language-scala
Syntax highlight bug: `/*`()
- Dominant language
- No language data
- Stars
- 51
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
The following code gets highlighted incorrectly:
```scala
def `/*`() = ()
`/*`()
```
The second `/*` is being treated as if it were the start of a block comment, even though it's inside backticks.
[Demo](https://github-lightshow.herokuapp.com/?utf8=%E2%9C%93&scope=from-url&grammar_url=https%3A%2F%2Fgithub.com%2Fatom-community%2Flanguage-scala%2Fblob%2Fv1.1.9%2Fgrammars%2Fscala.cson&grammar_text=&code_source=from-url&code_url=https%3A%2F%2Fgist.githubusercontent.com%2Fmkantor%2F127b02ac08b37e42ca84610b34cfb824%2Fraw%2F8f3172896fbafd31db7f81249e4bed9aaec2aeb4%2FBacktickSlashStar.scala&code=).
This exact same bug is present in the Scala TextMate bundle (mads-hartmann/scala.tmbundle/issues/58), which is currently used by [Linguist](https://github.com/github/linguist), so you'll see the same problem in the code block above.
Contributor guide
Research direction
Start by inspecting the Scala grammar referenced in the demo, grammars/scala.cson, and reproduce the issue with the provided backtick method name and invocation. Done means the /* inside backticks is highlighted as part of the identifier rather than as the start of a block comment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100