Skip to content

Commit

Permalink
Merge pull request #952 from TimvdLippe/diff-one-line
Browse files Browse the repository at this point in the history
Highlight diff lines with only + or -
  • Loading branch information
LeaVerou committed May 12, 2016
2 parents bd3a0b8 + 4d0526f commit 8b3c51d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/prism-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Prism.languages.diff = {
],

// Match inserted and deleted lines. Support both +/- and >/< styles.
'deleted': /^[-<].+$/m,
'inserted': /^[+>].+$/m,
'deleted': /^[-<].*$/m,
'inserted': /^[+>].*$/m,

// Match "different" lines (prefixed with "!") in context diff.
'diff': {
'pattern': /^!(?!!).+$/m,
'alias': 'important'
}
};
};

0 comments on commit 8b3c51d

Please sign in to comment.