From e5bbb476800c9bf24820701ec9252153ba07cf6a Mon Sep 17 00:00:00 2001 From: Seivan Heidari Date: Mon, 18 Nov 2019 02:37:18 +0100 Subject: Readding jsonc parser because of https://github.com/rust-analyzer/rust-analyzer/pull/2061\#discussion_r344783715 --- editors/code/src/scopes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editors/code/src') diff --git a/editors/code/src/scopes.ts b/editors/code/src/scopes.ts index 98099872c..8f288d761 100644 --- a/editors/code/src/scopes.ts +++ b/editors/code/src/scopes.ts @@ -1,4 +1,5 @@ import * as fs from 'fs'; +import * as jsonc from 'jsonc-parser'; import * as path from 'path'; import * as vscode from 'vscode'; @@ -140,7 +141,6 @@ function readFileText(filePath: string): string { return fs.readFileSync(filePath, 'utf8'); } -// Might need to replace with JSONC if a theme contains comments. function parseJSON(content: string): any { - return JSON.parse(content); + return jsonc.parse(content); } -- cgit v1.2.3