Skip to content

Commit

Permalink
specify predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhee17 committed Mar 6, 2024
1 parent c487fbb commit 7c56129
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/src/components/code-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function normalizeIndentation(
spacesPerTab: number = 4,
): string[] {
const spacesSet = new Set(code.map((l) => numSpaces(l, spacesPerTab)));
const spacesArr = [...spacesSet].sort();
const spacesArr = [...spacesSet].sort((n1, n2) => n1 - n2);
const spacesToIndent = new Map<number, string>(
spacesArr.map((value, index) => [value, ' '.repeat(index * indent)]),
);
Expand Down

0 comments on commit 7c56129

Please sign in to comment.