From 97440500d7da703c5b3cd8eb86bfe9b2e8f91375 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Mon, 19 Jul 2021 16:54:12 -0400 Subject: [PATCH] hoon: reverse parse order --- components/prism-hoon.js | 5 ++--- components/prism-hoon.min.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/prism-hoon.js b/components/prism-hoon.js index 1837d84df1..a3d408240a 100644 --- a/components/prism-hoon.js +++ b/components/prism-hoon.js @@ -4,14 +4,13 @@ Prism.languages.hoon = { pattern: /::.*/, greedy: true }, - 'function': /(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/, 'class-name': [ { - pattern: /@(?:[A-Za-z0-9-]*[A-Za-z0-9])?/, - greedy: true + pattern: /@(?:[A-Za-z0-9-]*[A-Za-z0-9])?/ }, /\*/ ], + 'function': /(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/, 'string': { pattern: /"[^"]*"|'[^']*'/, greedy: true diff --git a/components/prism-hoon.min.js b/components/prism-hoon.min.js index 3f409f405a..01eb598d0f 100644 --- a/components/prism-hoon.min.js +++ b/components/prism-hoon.min.js @@ -1 +1 @@ -Prism.languages.hoon={constant:/%(?:\.[ny]|[\w-]+)/,comment:{pattern:/::.*/,greedy:!0},function:/(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,"class-name":[{pattern:/@(?:[A-Za-z0-9-]*[A-Za-z0-9])?/,greedy:!0},/\*/],string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/:_|\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/}; \ No newline at end of file +Prism.languages.hoon={constant:/%(?:\.[ny]|[\w-]+)/,comment:{pattern:/::.*/,greedy:!0},"class-name":[{pattern:/@(?:[A-Za-z0-9-]*[A-Za-z0-9])?/},/\*/],function:/(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/:_|\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/}; \ No newline at end of file