[json] word pattern to match full string and number literals

This commit is contained in:
Martin Aeschlimann
2016-07-27 15:45:30 +02:00
parent da7264c5b3
commit 5e207a1dd7

View File

@@ -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+/
});
});
}