diff options
author | Camil Staps <info@camilstaps.nl> | 2016-02-16 18:17:51 +0100 |
---|---|---|
committer | Camil Staps <info@camilstaps.nl> | 2016-02-16 18:17:51 +0100 |
commit | 45ba01670e6e461b92d875e3b148095727cd588c (patch) | |
tree | 54e507183defd6d14fb8552c2d95d78ad9fbce48 /pygments/lexers/clean.py | |
parent | c95d81dafed75a46e5c44616bf7d3a5dbbef3b6e (diff) | |
download | pygments-git-45ba01670e6e461b92d875e3b148095727cd588c.tar.gz |
Fix previous commit
Diffstat (limited to 'pygments/lexers/clean.py')
-rw-r--r-- | pygments/lexers/clean.py | 14 |
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:] |