We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34bebc4 commit c980f97Copy full SHA for c980f97
lib/code-excerpt.js
@@ -6,7 +6,7 @@ const truncate = require('cli-truncate');
6
const chalk = require('chalk');
7
8
const formatLineNumber = (lineNumber, maxLineNumber) =>
9
- ' '.repeat(String(maxLineNumber).length - String(lineNumber).length) + lineNumber;
+ ' '.repeat(Math.max(0, String(maxLineNumber).length - String(lineNumber).length)) + lineNumber;
10
11
module.exports = (file, line, options) => {
12
options = options || {};
0 commit comments