Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzilong committed Jul 25, 2021
1 parent 5bbfc5e commit 976a4d4
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions lib/locate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@ function locate( source, locations ) {

const digits = String( frameEnd ).length + 1

const formattedLines = emphasize.highlight( 'js', source, {
comment: chalk.gray,
keyword: chalk.magenta,
built_in: chalk.cyan, // eslint-disable-line
string: chalk.green,
number: chalk.green,
literal: chalk.green,
'class': chalk.yellow, // eslint-disable-line
'function': chalk.reset.white, // eslint-disable-line
params: chalk.reset.white,
} ).value.split( '\n' )
const formattedLines = emphasize.highlight(
'js',
source,
{
comment: chalk.gray,
keyword: chalk.magenta,
built_in: chalk.cyan, // eslint-disable-line
string: chalk.green,
number: chalk.green,
literal: chalk.green,
'class': chalk.yellow, // eslint-disable-line
'function': chalk.reset.white, // eslint-disable-line
params: chalk.reset.white,
}
).value.split( '\n' )

return lines
.map( ( str, i ) => {
Expand Down

0 comments on commit 976a4d4

Please sign in to comment.