From 35cbc02fec2c44b508f02cb2e98e6ca111d39990 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 22 Sep 2020 16:50:57 +0200 Subject: [PATCH] Processing: Fixed function pattern (#2564) --- components/prism-processing.js | 2 +- components/prism-processing.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-processing.js b/components/prism-processing.js index 061fb59c97..c30f5119c1 100644 --- a/components/prism-processing.js +++ b/components/prism-processing.js @@ -12,7 +12,7 @@ Prism.languages.insertBefore('processing', 'number', { }); // Spaces are allowed between function name and parenthesis -Prism.languages.processing['function'].pattern = /\w+(?=\s*\()/; +Prism.languages.processing['function'] = /\w+(?=\s*\()/; // Class-names is not styled by default Prism.languages.processing['class-name'].alias = 'variable'; diff --git a/components/prism-processing.min.js b/components/prism-processing.min.js index 70f05feb24..9ba03b7bbe 100644 --- a/components/prism-processing.min.js +++ b/components/prism-processing.min.js @@ -1 +1 @@ -Prism.languages.processing=Prism.languages.extend("clike",{keyword:/\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),Prism.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"variable"}}),Prism.languages.processing.function.pattern=/\w+(?=\s*\()/,Prism.languages.processing["class-name"].alias="variable"; \ No newline at end of file +Prism.languages.processing=Prism.languages.extend("clike",{keyword:/\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),Prism.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"variable"}}),Prism.languages.processing.function=/\w+(?=\s*\()/,Prism.languages.processing["class-name"].alias="variable"; \ No newline at end of file