Skip to content

Commit

Permalink
Merge pull request #248 from BalticAmadeus/242-improve-temp-table-fie…
Browse files Browse the repository at this point in the history
…ld-formatting

242 Improve temp-table field formatting
  • Loading branch information
PauliusKu authored Oct 18, 2024
2 parents 10cc25b + 81d3a05 commit f263355
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/v2/formatters/tempTable/TempTableFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ export class TempTableFormatter extends AFormatter implements IFormatter {
newString =
" " + text + " ".repeat(this.alignType - text.length);
break;
case SyntaxNodeType.Error:
newString = FormatterHelper.getCurrentText(node, fullText);
break;
default:
newString = text.length === 0 ? "" : " " + text;
break;
Expand Down Expand Up @@ -159,6 +162,9 @@ export class TempTableFormatter extends AFormatter implements IFormatter {
let newString = "";
const text = FormatterHelper.getCurrentText(node, fullText).trim();
switch (node.type) {
case SyntaxNodeType.Error:
newString = FormatterHelper.getCurrentText(node, fullText);
break;
default:
newString = text.length === 0 ? "" : " " + text;
break;
Expand Down

0 comments on commit f263355

Please sign in to comment.