Skip to content

Commit

Permalink
also stylize single-quotes
Browse files Browse the repository at this point in the history
and only stylize when they're independent words
  • Loading branch information
sindresorhus committed Apr 26, 2016
1 parent b3dc768 commit 587f8b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ module.exports = function (results) {
var msg = x.message;

// stylize inline code blocks
msg = msg.replace(/`(.*?)`/g, function (m, p1) {
return chalk.bold(p1);
msg = msg.replace(/\B`(.*?)`\B|\B'(.*?)'\B/g, function (m, p1, p2) {
return chalk.bold(p1 || p2);
});

var line = String(x.line || 0);
Expand Down

0 comments on commit 587f8b5

Please sign in to comment.