Skip to content

Commit

Permalink
cleanup #92
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 17, 2016
1 parent 05f87e2 commit 18c64ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ function applyStyle() {
// will be colored, and the rest will simply be 'plain'.
str = code.open + str.replace(code.closeRe, code.open) + code.close;

// Close the coloring before a line break and reopening after next line
// To fix a bleed issue on macs
// see https://github.com/chalk/chalk/pull/92
str = str.replace(/\n/gm, code.close + '\n' + code.open);
// Close the styling before a linebreak and reopen
// after next line to fix a bleed issue on OS X
// https://github.com/chalk/chalk/pull/92
str = str.replace(/\r?\n/g, code.close + '$&' + code.open);
}

// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.
Expand Down

0 comments on commit 18c64ad

Please sign in to comment.