From c5f138ffef3d1b56d28e40cafcc398a78ed126a2 Mon Sep 17 00:00:00 2001 From: Gorkem Ercan Date: Sun, 11 Jun 2023 22:19:59 -0400 Subject: [PATCH] Change regex (#885) Changes regex to be more determenistic. --- src/languageservice/services/yamlHover.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languageservice/services/yamlHover.ts b/src/languageservice/services/yamlHover.ts index 0a5fb2a0..8807a6d1 100644 --- a/src/languageservice/services/yamlHover.ts +++ b/src/languageservice/services/yamlHover.ts @@ -89,7 +89,7 @@ export class YAMLHover { const createHover = (contents: string): Hover => { if (this.indentation !== undefined) { - const indentationMatchRegex = new RegExp(this.indentation, 'g'); + const indentationMatchRegex = new RegExp(` {${this.indentation.length}}`, 'g'); contents = contents.replace(indentationMatchRegex, ' '); }