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

Fix character lists with ' as last character

parent 90172770
...@@ -399,7 +399,7 @@ function highlightClean(func, callback, start) { ...@@ -399,7 +399,7 @@ function highlightClean(func, callback, start) {
charlist: [ charlist: [
[/(')(\s*)(\])/, ['literal literal-char', 'whitespace', 'punctuation'], 'pop'], [/(')(\s*)(\])/, ['literal literal-char', 'whitespace', 'punctuation'], 'pop'],
[/(\\.)/, ['literal literal-char']], [/(\\.)/, ['literal literal-char']],
[/([^']+)/, ['literal literal-char']] [/([^\\']+)/, ['literal literal-char']]
], ],
instance: [ instance: [
[/(\S+)/, ['classname'], 'jump:type'], [/(\S+)/, ['classname'], 'jump:type'],
......
{ {
"name": "clean.js", "name": "clean.js",
"version": "0.1.2", "version": "0.1.3",
"description": "Clean language highlighter", "description": "Clean language highlighter",
"main": "clean.js", "main": "clean.js",
"dependencies": {}, "dependencies": {},
......
...@@ -4,6 +4,8 @@ Start = map (appSnd3 toString o (appThd3 $ map (appSnd toString))) ...@@ -4,6 +4,8 @@ Start = map (appSnd3 toString o (appThd3 $ map (appSnd toString)))
where where
rgx = ['^([a-zA-Z\\d][\\w\\.%+-]*)@([a-zA-Z\\d-]+\\.)+[a-zA-Z]{2,}'] rgx = ['^([a-zA-Z\\d][\\w\\.%+-]*)@([a-zA-Z\\d-]+\\.)+[a-zA-Z]{2,}']
input = ['query@cloogle.org'] input = ['query@cloogle.org']
test = ['x\'']
----- -----
funcname Start funcname Start
whitespace whitespace
...@@ -66,3 +68,13 @@ whitespace ...@@ -66,3 +68,13 @@ whitespace
literal literal-char 'query@cloogle.org' literal literal-char 'query@cloogle.org'
whitespace whitespace
punctuation ] punctuation ]
whitespace \n\n
funcname test
whitespace
punctuation =
whitespace
punctuation [
whitespace
literal literal-char 'x\''
whitespace
punctuation ]
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