atom-community / atom-community/language-scala
Syntax highlight bug: '\r'|'\n'
- Dominant language
- No language data
- Stars
- 51
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
This (slimmed down) function:
```scala
def consume (c : Char) {
state =
(state,c) match {
case (HeaderLine(ln),'\r'|'\n') => { processHeaderLine(ln) ; NextLine(""+c) }
}
}
```
renders as this:

Adding spaces like `'\r' | '\n'` fixes the issue.
Contributor guide
Research direction
Reproduce the reported rendering with the Scala snippet, then inspect the syntax-highlighting grammar or rules used for character literals and the `|` operator. Verify the fix against both `'\r'|'\n'` and `'\r' | '\n'`, and confirm the rendered highlighting is correct.
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
- Mostly clear
- Newbie friendliness
- 45/100