on master help sign in
patch: amend hoon definition to simplify
b8da218Matilde Park
patches/prismjs+1.24.0.patch+9−21
@@ -15,50 +15,38 @@ index ac6ad14..8401713 100644
15 "optional": [
15 "optional": [
16diff --git a/node_modules/prismjs/components/prism-hoon.js b/node_modules/prismjs/components/prism-hoon.js
16diff --git a/node_modules/prismjs/components/prism-hoon.js b/node_modules/prismjs/components/prism-hoon.js
17new file mode 100644
17new file mode 100644
18−index 0000000..61775c6
18+index 0000000..0e4cf3a
19--- /dev/null
19--- /dev/null
20+++ b/node_modules/prismjs/components/prism-hoon.js
20+++ b/node_modules/prismjs/components/prism-hoon.js
21−@@ -0,0 +1,42 @@
21+@@ -0,0 +1,30 @@
22+Prism.languages.hoon = {
22+Prism.languages.hoon = {
23−+ constant: [
23++ constant: /(?:%\.n)|(?:%\.y)|(?:%[\w-]*[\w\d]?)/,
24−+ {
25−+ pattern: /(%\.n)|(%\.y)|(%[\w-]*[\w\d]?)/,
26−+ }
27−+ ],
28+ comment: {
24+ comment: {
29+ pattern: /::.*/,
25+ pattern: /::.*/,
30+ lookahead: true,
26+ lookahead: true,
31+ greedy: true
27+ greedy: true
32+ },
28+ },
33−+ "function-name": [
29++ "function-name" :/(?:\+[-+] )?(?:[a-z]([a-z0-9-]*[a-z0-9])?)/,
34−+ {
35−+ pattern: /(\+[-+] )?([a-z]([a-z0-9-]*[a-z0-9])?)/
36−+ },
37−+ ],
38+ "class-name": [
30+ "class-name": [
39+ {
31+ {
40−+ pattern: /@([a-z])?([A-Za-z0-9-]*[A-Za-z0-9])?/,
32++ pattern: /@(?:[a-z])?(?:[A-Za-z0-9-]*[A-Za-z0-9])?/,
41+ lookahead: true,
33+ lookahead: true,
42+ greedy: true
34+ greedy: true
43+ },
35+ },
44−+ {
45−+ pattern: /\*/
36++ /\*/
46−+ }
47+ ],
37+ ],
48+ "string": [
38+ "string": [
49+ {
39+ {
50−+ pattern: /"([^"])*"/,
40++ pattern: /"(?:[^"])*"/,
51+ lookahead: true,
41+ lookahead: true,
52+ greedy: true
42+ greedy: true
53+ },
43+ },
54+ {
44+ {
55−+ pattern: /'([^'])*'/,
45++ pattern: /'(?:[^'])*'/,
56+ lookahead: true,
46+ lookahead: true,
57+ greedy: true
47+ greedy: true
58+ }
48+ }
59+ ],
49+ ],
60−+ "keyword": {
50++ "keyword": /:_|\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/
61−+ pattern: /:_|\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/
62−+ }
63+}
51+}
64\ No newline at end of file
52\ No newline at end of file