Skip to content

Commit

Permalink
C: Removed string pattern (now that C-like supports escaped new lines…
Browse files Browse the repository at this point in the history
…) + simplified operators regexp
  • Loading branch information
Golmote committed Jul 12, 2015
1 parent 903b8a4 commit dcce1a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions components/prism-c.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Prism.languages.c = Prism.languages.extend('clike', {
// allow for c multiline strings
'string': /("|')([^\n\\\1]|\\.|\\\r*\n)*?\1/,
'keyword': /\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\//
'operator': /\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/
});

Prism.languages.insertBefore('c', 'string', {
Expand Down
2 changes: 1 addition & 1 deletion components/prism-c.min.js

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

0 comments on commit dcce1a7

Please sign in to comment.