mirror of
https://github.com/arsenetar/PrismHighlight.git
synced 2024-11-23 20:39:01 +00:00
10 lines
527 B
JavaScript
10 lines
527 B
JavaScript
Prism.languages.c = Prism.languages.extend('clike', {
|
|
'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/g,
|
|
'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|={1,2}|\^|~|%|(&){1,2}|\|?\||\?|\*|\//g
|
|
});
|
|
|
|
Prism.languages.insertBefore('c', 'keyword', {
|
|
//property class reused for macro statements
|
|
'property': /#\s*[a-zA-Z]+/g
|
|
});
|