ThirdParty/Pygments/pygments/regexopt.py

changeset 5713
6762afd9f963
parent 4697
c2e9bf425554
--- a/ThirdParty/Pygments/pygments/regexopt.py	Sun Apr 23 16:40:31 2017 +0200
+++ b/ThirdParty/Pygments/pygments/regexopt.py	Tue Apr 25 18:36:38 2017 +0200
@@ -6,7 +6,7 @@
     An algorithm that generates optimized regexes for matching long lists of
     literal strings.
 
-    :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -54,7 +54,7 @@
                 return open_paren + regex_opt_inner(rest, '') + '|' \
                     + make_charset(oneletter) + close_paren
             # print '-> only 1-character'
-            return make_charset(oneletter)
+            return open_paren + make_charset(oneletter) + close_paren
     prefix = commonprefix(strings)
     if prefix:
         plen = len(prefix)

eric ide

mercurial