Commit b5963ff
fix: handle tokens with trailing line terminators in highlighter
Tokens from bsl-parser 0.31.0 may include trailing CR/LF characters
in their text. When computing the highlight range end offset, this
caused the offset to exceed the line length, resulting in
IllegalArgumentException from SonarQube.
Truncate token text at the first newline/CR to compute correct
single-line highlight ranges.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 36bb40c commit b5963ff
1 file changed
Lines changed: 13 additions & 1 deletion
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
187 | 199 | | |
188 | 200 | | |
189 | 201 | | |
190 | | - | |
| 202 | + | |
191 | 203 | | |
192 | 204 | | |
193 | 205 | | |
| |||
0 commit comments