Skip to content

Commit

Permalink
Merge commit '584256350180886363a8ebe7a6e316b7404f230e' into 212-vers…
Browse files Browse the repository at this point in the history
…ion-0040-of-tree-sitter-abl
  • Loading branch information
PauliusKu committed Sep 23, 2024
2 parents ab3d231 + 5842563 commit db5674f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/v2/formatters/if/IfFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ export class IfFormatter extends AFormatter implements IFormatter {
let newString = "";

switch (node.type) {
case SyntaxNodeType.ThenKeyword:
newString = this.settings.newLineBeforeThen()
? fullText.eolDelimiter +
" ".repeat(this.startColumn) +
FormatterHelper.getCurrentText(node, fullText).trim()
: " " +
FormatterHelper.getCurrentText(node, fullText).trim();
break;
case SyntaxNodeType.ElseKeyword:
newString =
fullText.eolDelimiter +
Expand Down

0 comments on commit db5674f

Please sign in to comment.