summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Jain <gaurav@gauravjain.org>2014-04-17 17:24:00 -0400
committerGaurav Jain <gaurav@gauravjain.org>2014-04-17 17:24:00 -0400
commit32f94e018695a2c2cea054e99ec69f8622725d3e (patch)
treed1b24bc5814917013b6e20cf9a0fb7ff7e6cf559
parent84b7c8aca975566dde86fc90a23d49353e534265 (diff)
downloadpygments-32f94e018695a2c2cea054e99ec69f8622725d3e.tar.gz
Fixed LiveScript backslash strings to terminate on whitespace
-rw-r--r--pygments/lexers/web.py2
-rw-r--r--tests/examplefiles/livescript-demo.ls2
2 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py
index f8c89204..180c8e8a 100644
--- a/pygments/lexers/web.py
+++ b/pygments/lexers/web.py
@@ -2710,7 +2710,7 @@ class LiveScriptLexer(RegexLexer):
("'''", String, 'tsqs'),
('"', String, 'dqs'),
("'", String, 'sqs'),
- (r'\\[\w$-]+', String),
+ (r'\\\S+', String),
(r'<\[.*?\]>', String),
],
'strings': [
diff --git a/tests/examplefiles/livescript-demo.ls b/tests/examplefiles/livescript-demo.ls
index 16d1894a..03cbcc99 100644
--- a/tests/examplefiles/livescript-demo.ls
+++ b/tests/examplefiles/livescript-demo.ls
@@ -7,7 +7,7 @@ dashes-identifiers = ->
underscores_i$d = ->
/regexp1/
//regexp2//g
- 'strings' and "strings" and \strings
+ 'strings' and "strings" and \strings and \#$-"\'strings
another-word-list = <[ more words ]>