Skip to content

Commit 65db20c

Browse files
committed
fix: add padding of ...
1 parent 56e9310 commit 65db20c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commit-message-checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ const debugRegexMatching = (regexes: (string | string[])[], str: string): string
149149
return `Trailing characters: "${str}"
150150
--------------------------------
151151
Context: "${leftDots}${copyStr.slice(paddingLeft, Math.min(copyStr.length, matchesUntil + 10)).replaceAll('\n', '␤')}${rightDots}"
152-
${" ".repeat(matchesUntil - paddingLeft)}^`;
152+
${leftDots.replace('…', ' ')}${" ".repeat(matchesUntil - paddingLeft)}^`;
153153
} else {
154154
return `The regex stopped matching at index: ${matchesUntil}.
155155
Expected: "${rgx}"
156156
Context: "${leftDots}${copyStr.slice(paddingLeft, paddingRight).replaceAll('\n', '␤')}${rightDots}"
157-
${" ".repeat(matchesUntil - paddingLeft)}^${"~".repeat(paddingRight - matchesUntil)}`;
157+
${leftDots.replace('…', ' ')}${" ".repeat(matchesUntil - paddingLeft)}^${"~".repeat(paddingRight - matchesUntil)}`;
158158
}
159159
}
160160
}

0 commit comments

Comments
 (0)