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