Skip to content

Commit

Permalink
LaTeX commands with nested curly braces improperly removed from spell…
Browse files Browse the repository at this point in the history
…ing (#120)
  • Loading branch information
bartosz-antosik committed Feb 28, 2018
1 parent a1e1cfb commit 393036e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## **2.1.24** released on 28th February 2018

- **New:** LaTeX magic comments (`!TEX`) removed from spelling.
- **New:** LaTeX magic comments (`!TEX`) removed from spelling ([#120](https://github.com/bartosz-antosik/vscode-spellright/issues/120)).
- **New:** Added spelling parser settings for LISP (comments & strings) source code files.
- **Change:** LaTeX commands with nested curly braces improperly removed from spelling ([#120](https://github.com/bartosz-antosik/vscode-spellright/issues/120)).

## **2.1.22** released on 26th February 2018

Expand Down
2 changes: 1 addition & 1 deletion lib/parsers/latex.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LaTeX extends Parser.default {
}

// Remove commands
var re = /\\\w+\*?(\[[\s\S]*?\])*((\{|\()[\s\S]*?(\}|\)))*(\[[\s\S]*?\])*/g;
var re = /\\\w+\*?(\[[\s\S]*?\])*(\{(?:\{[^\}]*\}|[^\{\}])*\})/g;
while (match = re.exec(text)) {
//var replace = ' '.repeat(match[0].length);
var replace = match[0].replace(/(?:[^\r\n]|\r(?!\n))/g, ' ');
Expand Down

0 comments on commit 393036e

Please sign in to comment.