Skip to content

Commit 4d0526f

Browse files
committed
Highlight diff lines with only + or -
1 parent 6ec9238 commit 4d0526f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/prism-diff.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Prism.languages.diff = {
99
],
1010

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

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

0 commit comments

Comments
 (0)