diff options
author | Tim Hatch <tim@timhatch.com> | 2012-10-30 09:45:42 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2012-10-30 09:45:42 -0700 |
commit | 756e39a4233340f63ca0f67c7d0a76a235735a6c (patch) | |
tree | 2e5415bd6c351279a11af20eb4140d60da0b2d37 | |
parent | f134b65d5f3c45868206e126ca3fa651a1b0504d (diff) | |
download | pygments-756e39a4233340f63ca0f67c7d0a76a235735a6c.tar.gz |
Fix Issue #810, allowing words to start with 'is' properly.
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | pygments/lexers/compiled.py | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -32,6 +32,8 @@ Version 1.6 - Fix some S/R lexer errors (PR#91) +- Fix a bug in the Prolog lexer with names that start with 'is' (#810) + Version 1.5 ----------- diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index 450a9c4d..bd0e7943 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -1450,7 +1450,8 @@ class PrologLexer(RegexLexer): (r"'(?:''|[^'])*'", String.Atom), # quoted atom # Needs to not be followed by an atom. #(r'=(?=\s|[a-zA-Z\[])', Operator), - (r'(is|<|>|=<|>=|==|=:=|=|/|//|\*|\+|-)(?=\s|[a-zA-Z0-9\[])', + (r'is\b', Operator), + (r'(<|>|=<|>=|==|=:=|=|/|//|\*|\+|-)(?=\s|[a-zA-Z0-9\[])', Operator), (r'(mod|div|not)\b', Operator), (r'_', Keyword), # The don't-care variable |