Skip to content

Commit

Permalink
feat: use full width - and full height │
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzilong committed Oct 1, 2021
1 parent cc7d758 commit c35aae6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = function ( results ) {
[ errorSummary, warningSummary ].join( ' ' ) +
`🔥\n`

const divider = chalk.dim( '-'.repeat( stringWidth( header ) ) )
const divider = chalk.dim( ''.repeat( stringWidth( header ) ) )
header = divider + header + divider

lines.push( header )
Expand Down Expand Up @@ -95,9 +95,9 @@ module.exports = function ( results ) {
const totalFixableMessage = chalk.greenBright( ` ${ chalk.bold( autoFixableCount ) } ${ plur( 'auto-fixable', autoFixableCount ) } ( with the \`--fix\` flag )` )
const maxLen = stringWidth( totalFixableMessage ) + 1
return `\n${ lines.join( '\n' ) }\n` +
`${ gradient.fruit( `-`.repeat( maxLen ) ) }\n` +
`${ gradient.fruit( ``.repeat( maxLen ) ) }\n` +
`${ totalErrorMessage }\n${ totalWarningMessage }\n${ totalFixableMessage }\n` +
`${ gradient.cristal( `-`.repeat( maxLen ) ) }\n`
`${ gradient.cristal( ``.repeat( maxLen ) ) }\n`
}

return ''
Expand Down
4 changes: 2 additions & 2 deletions lib/locator.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function locate( source, locations ) {
} )

indicators = indicators.reduce( ( memo, indicator, index ) => {
let char = '|'
let char = ''

if ( index === indicators.length - 1 ) {
char = '↑'
Expand All @@ -68,7 +68,7 @@ function locate( source, locations ) {
return
}

indicator.content = replaceAt( indicator.content, m.spaceLen, '|' )
indicator.content = replaceAt( indicator.content, m.spaceLen, '' )
insertIndexes.push( m.spaceLen )
} )

Expand Down

0 comments on commit c35aae6

Please sign in to comment.