Skip to content

Commit

Permalink
C-like: Improved operator regex + add != and !==
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Aug 22, 2015
1 parent f77b40b commit 135ee9d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/prism-clike.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Prism.languages.clike = {
'boolean': /\b(true|false)\b/,
'function': /[a-z0-9_]+(?=\()/i,
'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/,
'operator': /[-+]{1,2}|!|<=?|>=?|={1,3}|&{1,2}|\|?\||\?|\*|\/|~|\^|%/,
'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
'punctuation': /[{}[\];(),.:]/
};
2 changes: 1 addition & 1 deletion components/prism-clike.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion prism.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ Prism.languages.clike = {
'boolean': /\b(true|false)\b/,
'function': /[a-z0-9_]+(?=\()/i,
'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/,
'operator': /[-+]{1,2}|!|<=?|>=?|={1,3}|&{1,2}|\|?\||\?|\*|\/|~|\^|%/,
'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
'punctuation': /[{}[\];(),.:]/
};

Expand Down

0 comments on commit 135ee9d

Please sign in to comment.