Skip to content

Commit 1ec76d4

Browse files
committed
fix(mcp): avoid a comment-induced trailing-whitespace line in compiled format-table.js
tsc's printer left a trailing space at the end of renderRow's arrow-function line when a comment sat between => and its expression body in the .ts source -- caught by CI's git diff --check gate. Hoists the comment above the declaration instead; no behavior change.
1 parent c4ad9f0 commit 1ec76d4

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

packages/loopover-mcp/lib/format-table.js

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/loopover-mcp/lib/format-table.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export function formatTable(input?: TableInput | null, opts: FormatTableOptions
6262
const widths = headers.map((header, column) =>
6363
Math.max(header.label.length, ...bodyCells.map((cells) => cells[column]!.length), 0),
6464
);
65+
// Trim trailing padding so a left-aligned final column never emits dangling spaces.
6566
const renderRow = (cells: string[]) =>
66-
// Trim trailing padding so a left-aligned final column never emits dangling spaces.
6767
cells.map((text, column) => (aligns[column] === "right" ? text.padStart(widths[column]!) : text.padEnd(widths[column]!))).join(gap).replace(/\s+$/, "");
6868
return [renderRow(headers.map((header) => header.label)), ...bodyCells.map(renderRow)].join("\n");
6969
}

0 commit comments

Comments
 (0)