Skip to content

Commit 8110d38

Browse files
committed
Processing: Regexp simplification
1 parent 0d05957 commit 8110d38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/prism-processing.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Prism.languages.insertBefore('processing', 'number', {
66
// Special case: XML is a type
77
'constant': /\b(?!XML\b)[A-Z][A-Z\d_]+\b/,
88
'type': {
9-
pattern: /\b(?:boolean|byte|char|color|double|float|int|XML|[A-Z][A-Za-z\d_]*)\b/,
9+
pattern: /\b(?:boolean|byte|char|color|double|float|int|XML|[A-Z]\w*)\b/,
1010
alias: 'variable'
1111
}
1212
});
1313

1414
// Spaces are allowed between function name and parenthesis
15-
Prism.languages.processing['function'].pattern = /[a-z0-9_]+(?=\s*\()/i;
15+
Prism.languages.processing['function'].pattern = /\w+(?=\s*\()/;
1616

1717
// Class-names is not styled by default
1818
Prism.languages.processing['class-name'].alias = 'variable';

components/prism-processing.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)