Skip to content

Commit

Permalink
Processing: Regexp simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 22, 2017
1 parent 0d05957 commit 8110d38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/prism-processing.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Prism.languages.insertBefore('processing', 'number', {
// Special case: XML is a type
'constant': /\b(?!XML\b)[A-Z][A-Z\d_]+\b/,
'type': {
pattern: /\b(?:boolean|byte|char|color|double|float|int|XML|[A-Z][A-Za-z\d_]*)\b/,
pattern: /\b(?:boolean|byte|char|color|double|float|int|XML|[A-Z]\w*)\b/,
alias: 'variable'
}
});

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

// Class-names is not styled by default
Prism.languages.processing['class-name'].alias = 'variable';
2 changes: 1 addition & 1 deletion components/prism-processing.min.js

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

0 comments on commit 8110d38

Please sign in to comment.