Verified Commit fa631104 authored by Camil Staps's avatar Camil Staps 🙂

v0.1.26: fix highlighting of inline ABC where no space preceeds the closing }

parent c42fa8f4
Pipeline #26136 passed with stage
in 28 seconds
...@@ -444,14 +444,14 @@ var highlightRules = { ...@@ -444,14 +444,14 @@ var highlightRules = {
[/(\s+)/, ['whitespace'], 'abcInstruction'], [/(\s+)/, ['whitespace'], 'abcInstruction'],
[/(\|.*\n)/, ['comment']], [/(\|.*\n)/, ['comment']],
[/(})/, ['punctuation'], 'pop'], [/(})/, ['punctuation'], 'pop'],
[/(\S+)/, ['label'], 'abcInstruction'] [/([^\s}]+)/, ['label'], 'abcInstruction']
], ],
abcInstruction: [ abcInstruction: [
[/(})/, ['punctuation'], 'pop:2'], [/(})/, ['punctuation'], 'pop:2'],
[/(;)/, ['punctuation'], 'pop'], [/(;)/, ['punctuation'], 'pop'],
[/(\n)/, ['whitespace'], 'pop'], [/(\n)/, ['whitespace'], 'pop'],
[/(\|.*\n)/, ['comment'], 'pop'], [/(\|.*\n)/, ['comment'], 'pop'],
[/(\S+)/, ['abc-instruction'], 'jump:abcArgument'] [/([^\s}]+)/, ['abc-instruction'], 'jump:abcArgument']
], ],
abcArgument: [ abcArgument: [
[/(\n)/, ['whitespace'], 'pop'], [/(\n)/, ['whitespace'], 'pop'],
...@@ -470,7 +470,7 @@ var highlightRules = { ...@@ -470,7 +470,7 @@ var highlightRules = {
[/\b(TRUE|FALSE)\b/, [/\b(TRUE|FALSE)\b/,
['literal literal-bool']], ['literal literal-bool']],
[/(")/, ['literal literal-string'], 'string'], [/(")/, ['literal literal-string'], 'string'],
[/(\S+)/, ['abc-argument']] [/([^\s}]+)/, ['abc-argument']]
], ],
abcDirective: [ abcDirective: [
[/(\n)/, ['whitespace'], 'pop'], [/(\n)/, ['whitespace'], 'pop'],
......
{ {
"name": "clean-highlighter", "name": "clean-highlighter",
"version": "0.1.25", "version": "0.1.26",
"description": "Clean language highlighter", "description": "Clean language highlighter",
"keywords": ["clean","highlighter"], "keywords": ["clean","highlighter"],
"main": "clean.js", "main": "clean.js",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment