From 06552fda82b036503d6a60b32f416d41a68dffd3 Mon Sep 17 00:00:00 2001 From: Dennis Buchhorn Date: Mon, 31 Jan 2022 17:16:44 +0100 Subject: [PATCH] feat: add 'THEN' to same indentation as 'IF' and 'ELSE' if it is in new line --- VHDLFormatter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VHDLFormatter.js b/VHDLFormatter.js index b79cd6f..fadc99c 100644 --- a/VHDLFormatter.js +++ b/VHDLFormatter.js @@ -745,7 +745,7 @@ function beautify3(block, result, settings, indent) { let regexBlockIndentedEndsKeyWords = indentedEndsKeyWords.convertToRegexBlockWords(); let regexblockEndsWithSemicolon = blockEndsWithSemicolon.convertToRegexBlockWords(); let regexMidKeyWhen = "WHEN".convertToRegexBlockWords(); - let regexMidKeyElse = "ELSE|ELSIF".convertToRegexBlockWords(); + let regexMidKeyElse = "THEN|ELSE|ELSIF".convertToRegexBlockWords(); for (; block.cursor <= block.end; block.cursor++) { if (indent < 0) { indent = 0; @@ -964,4 +964,4 @@ function RemoveExtraNewLines(input) { input = input.replace(/\r\n\r\n\r\n/g, '\r\n'); return input; } -//# sourceMappingURL=VHDLFormatter.js.map \ No newline at end of file +//# sourceMappingURL=VHDLFormatter.js.map