Using removeComments from commandLineParser. This is more robust as it removes both single and multiline comments

This commit is contained in:
Jason Ramsay
2016-02-23 13:30:24 -08:00
parent 20511f8be1
commit 18883f9d32
2 changed files with 2 additions and 3 deletions

View File

@@ -503,7 +503,7 @@ namespace ts {
*
* This method replace comment content by whitespace rather than completely remove them to keep positions in json parsing error reporting accurate.
*/
function removeComments(jsonText: string): string {
export function removeComments(jsonText: string): string {
let output = "";
const scanner = createScanner(ScriptTarget.ES5, /* skipTrivia */ false, LanguageVariant.Standard, jsonText);
let token: SyntaxKind;