Skip to content

Commit 354ed94

Browse files
author
Akila Tennakoon
committed
Undo SytaxTree regex changes
1 parent ad2e3f4 commit 354ed94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/context/syntaxtree/SyntaxTree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ export abstract class SyntaxTree {
363363
// Look for patterns like "text" and convert to "text": null
364364
const modifiedLines = [...this.lines];
365365
// Replace quoted strings that aren't followed by : with complete key-value pairs
366-
modifiedLines[position.line] = currentLine.replaceAll(/"([^"]*)"\s*(?!:)/g, '"$1": null');
366+
modifiedLines[position.line] = currentLine.replace(/"([^"]*)"\s*(?!:)/g, '"$1": null');
367367
const completedContent = modifiedLines.join('\n');
368368
const result = this.testIncrementalParsing(completedContent, position);
369369
if (result) return result;
@@ -534,7 +534,7 @@ export abstract class SyntaxTree {
534534
if (grandparent && NodeType.isNodeType(grandparent, YamlNodeTypes.FLOW_MAPPING)) {
535535
// Is incomplete key pair in an object
536536
// { "" }
537-
propertyPath.push(current.text.replaceAll(/^,?\s*"|"\s*/g, ''));
537+
propertyPath.push(current.text.replace(/^,?\s*"|"\s*/g, ''));
538538
entityPath.push(current);
539539
}
540540
}

0 commit comments

Comments
 (0)