Skip to content

Commit

Permalink
fix: handle case where whitespace is a negative value
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Sep 21, 2024
1 parent 2a491ec commit 638c457
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/dumper/dumper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ export class Dumper {
* Whitespace between the title and the link to align them
* on each side of x axis
*/
const whiteSpace = new Array(columns - link.length - title.length - 4).join(' ')
const whiteSpaceLength = columns - link.length - title.length - 4
const whiteSpace = new Array(whiteSpaceLength <= 0 ? 1 : whiteSpaceLength).join(' ')

/**
* Styled heading with background color and bold text
Expand Down

0 comments on commit 638c457

Please sign in to comment.