Commits

Christina Whyte committed b94a92a

Word array lexer shouldn't be greedy.

Word array is only allowed to contain words and whitespace, `]>` is not allowed
to occur in such a construct, thus it should end the construct at the very
first occurrence.

An example of the problem can be seen in this gist:

https://gist.github.com/kurisuwhyte/6050066

Comments (0)

Files changed (2)

pygments/lexers/web.py

             ('"', String, 'dqs'),
             ("'", String, 'sqs'),
             (r'\\[\w$-]+', String),
-            (r'<\[.*\]>', String),
+            (r'<\[.*?\]>', String),
         ],
         'strings': [
             (r'[^#\\\'"]+', String),

tests/examplefiles/livescript-demo.ls

   //regexp2//g
   'strings' and "strings" and \strings
 
+another-word-list = <[ more words ]>
+
 [2 til 10]
   |> map (* 2)
   |> filter (> 5)