Skip to content

Commit

Permalink
[monaco] Fix regex for the electron runtime
Browse files Browse the repository at this point in the history
The Electron version we use embbeds Node 8.2.1 which doesn't support
negative-lookbehinds in regexs.

Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
  • Loading branch information
paul-marechal authored and kittaakos committed Dec 6, 2018
1 parent 1a45599 commit f73263b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/monaco/src/browser/monaco-keybinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class MonacoKeybindingContribution implements KeybindingContribution {
keybinding = { ...keybinding, ctrlKey: true, metaKey: false };
}
}
const isInDiffEditor = item.when && /(?<!\!\s*)isInDiffEditor/gm.test(item.when.serialize());
const isInDiffEditor = item.when && /(^|[^!])\bisInDiffEditor\b/gm.test(item.when.serialize());
registry.registerKeybinding({
command,
keybinding: this.keyCode(keybinding).toString(),
Expand Down

0 comments on commit f73263b

Please sign in to comment.