summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2012-10-30 09:45:42 -0700
committerTim Hatch <tim@timhatch.com>2012-10-30 09:45:42 -0700
commit756e39a4233340f63ca0f67c7d0a76a235735a6c (patch)
tree2e5415bd6c351279a11af20eb4140d60da0b2d37
parentf134b65d5f3c45868206e126ca3fa651a1b0504d (diff)
downloadpygments-756e39a4233340f63ca0f67c7d0a76a235735a6c.tar.gz
Fix Issue #810, allowing words to start with 'is' properly.
-rw-r--r--CHANGES2
-rw-r--r--pygments/lexers/compiled.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 230afc60..99217b87 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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