Fixed a crash detecting a text starting with a '.'.

Tue, 01 Feb 2011 16:39:33 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 01 Feb 2011 16:39:33 +0100
changeset 870
ec391c7f0a58
parent 854
2f4ffd2c7d02
child 871
fbbcef4f43fb

Fixed a crash detecting a text starting with a '.'.

ThirdParty/Pygments/pygments/util.py file | annotate | diff | comparison | revisions
--- a/ThirdParty/Pygments/pygments/util.py	Tue Jan 18 16:31:26 2011 +0100
+++ b/ThirdParty/Pygments/pygments/util.py	Tue Feb 01 16:39:33 2011 +0100
@@ -120,6 +120,8 @@
             return min(1.0, max(0.0, float(rv)))
         except ValueError:
             return 0.0
+        except TypeError:
+            return 0.0
     text_analyse.__doc__ = f.__doc__
     return staticmethod(text_analyse)
 

eric ide

mercurial