Browse Source

feat: add 'THEN' to same indentation as 'IF' and 'ELSE' if it is in new line

master
Dennis Buchhorn 2 years ago
parent
commit
06552fda82
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      VHDLFormatter.js

+ 2
- 2
VHDLFormatter.js View File

@ -745,7 +745,7 @@ function beautify3(block, result, settings, indent) {
let regexBlockIndentedEndsKeyWords = indentedEndsKeyWords.convertToRegexBlockWords(); let regexBlockIndentedEndsKeyWords = indentedEndsKeyWords.convertToRegexBlockWords();
let regexblockEndsWithSemicolon = blockEndsWithSemicolon.convertToRegexBlockWords(); let regexblockEndsWithSemicolon = blockEndsWithSemicolon.convertToRegexBlockWords();
let regexMidKeyWhen = "WHEN".convertToRegexBlockWords(); let regexMidKeyWhen = "WHEN".convertToRegexBlockWords();
let regexMidKeyElse = "ELSE|ELSIF".convertToRegexBlockWords();
let regexMidKeyElse = "THEN|ELSE|ELSIF".convertToRegexBlockWords();
for (; block.cursor <= block.end; block.cursor++) { for (; block.cursor <= block.end; block.cursor++) {
if (indent < 0) { if (indent < 0) {
indent = 0; indent = 0;
@ -964,4 +964,4 @@ function RemoveExtraNewLines(input) {
input = input.replace(/\r\n\r\n\r\n/g, '\r\n'); input = input.replace(/\r\n\r\n\r\n/g, '\r\n');
return input; return input;
} }
//# sourceMappingURL=VHDLFormatter.js.map
//# sourceMappingURL=VHDLFormatter.js.map

Loading…
Cancel
Save