Commit 91ab044
committed
fix: [BUG]: single-line comment fails in VS Code June release
Fixes #10
In the `setSingleLineCommentLanguageDefinitions` method, it uses the `String.includes` method to detect when the `lineComment` string `includes` a semi-colon - ;. The `lineComment` the language config has changed to be either a string or an object. The object has a `comment` and `noIndent` keys.
The `includes` method fails due to it being an object and errors out with "lineComment.includes is not a function".
To fix:
- Added a check to see if the `lineComment` is an object with a `comment` key inside, if it does then use the string value of the `comment` key. Otherwise, it will use the string value of the `lineComment`.1 parent 7b51228 commit 91ab044
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
522 | 530 | | |
523 | | - | |
| 531 | + | |
524 | 532 | | |
525 | 533 | | |
526 | 534 | | |
527 | | - | |
| 535 | + | |
528 | 536 | | |
529 | 537 | | |
530 | 538 | | |
531 | | - | |
| 539 | + | |
532 | 540 | | |
533 | 541 | | |
534 | 542 | | |
| |||
0 commit comments