From 5e207a1dd79589f8955b1bf10ca266d3967c2183 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 27 Jul 2016 15:45:30 +0200 Subject: [PATCH] [json] word pattern to match full string and number literals --- extensions/json/client/src/jsonMain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/json/client/src/jsonMain.ts b/extensions/json/client/src/jsonMain.ts index ad11e170022..69dd973f1ec 100644 --- a/extensions/json/client/src/jsonMain.ts +++ b/extensions/json/client/src/jsonMain.ts @@ -89,7 +89,7 @@ export function activate(context: ExtensionContext) { context.subscriptions.push(disposable); languages.setLanguageConfiguration('json', { - wordPattern: /(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g + wordPattern: /("(?:[^\\\"]*(?:\\.)?)*"?)|(-?\d+\.?\d*([eE][+-]?\d*)?)|-|\w+/ }); }); } -- GitLab