summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps <info@camilstaps.nl>2016-02-16 18:17:51 +0100
committerCamil Staps <info@camilstaps.nl>2016-02-16 18:17:51 +0100
commita943ba5c2fec8f4000b97dd9e1f72a7fd7e58aac (patch)
tree8c202046384ea3e0dc5429a9f5ee738218d9105f
parent9bd5917c4ea99511da03c9a6fadc513aec54cd7b (diff)
downloadpygments-a943ba5c2fec8f4000b97dd9e1f72a7fd7e58aac.tar.gz
Fix previous commit
-rw-r--r--pygments/lexers/clean.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pygments/lexers/clean.py b/pygments/lexers/clean.py
index f6f62cff..a29233c3 100644
--- a/pygments/lexers/clean.py
+++ b/pygments/lexers/clean.py
@@ -48,28 +48,28 @@ class CleanLexer(ExtendedRegexLexer):
def store_indent(lexer, match, ctx):
# Tabs are four spaces:
# https://svn.cs.ru.nl/repos/clean-platform/trunk/doc/STANDARDS.txt
- self.stored_indent = len(match.group(0).replace('\t',' '))
+ lexer.stored_indent = len(match.group(0).replace('\t',' '))
ctx.pos = match.end()
yield match.start(), Text, match.group(0)
def check_indent1(lexer, match, ctx):
indent = len(match.group(0)) - 1
- if indent > self.stored_indent:
+ if indent > lexer.stored_indent:
yield match.start(), Whitespace, match.group(0)
ctx.pos = match.start() + indent + 1
else:
- self.stored_indent = 0
+ lexer.stored_indent = 0
ctx.pos = match.start()
ctx.stack = ctx.stack[:-1]
yield match.start(), Whitespace, match.group(0)[1:]
def check_indent2(lexer, match, ctx):
indent = len(match.group(0)) - 1
- if indent > self.stored_indent:
+ if indent > lexer.stored_indent:
yield match.start(), Whitespace, match.group(0)
ctx.pos = match.start() + indent + 1
else:
- self.stored_indent = 0
+ lexer.stored_indent = 0
ctx.pos = match.start()
ctx.stack = ctx.stack[:-2]
yield match.start(), Whitespace, match.group(0)[1:]
@@ -78,11 +78,11 @@ class CleanLexer(ExtendedRegexLexer):
def check_indent3(lexer, match, ctx):
indent = len(match.group(0)) - 1
- if indent > self.stored_indent:
+ if indent > lexer.stored_indent:
yield match.start(), Whitespace, match.group(0)
ctx.pos = match.start() + indent + 1
else:
- self.stored_indent = 0
+ lexer.stored_indent = 0
ctx.pos = match.start()
ctx.stack = ctx.stack[:-3]
yield match.start(), Whitespace, match.group(0)[1:]