summaryrefslogtreecommitdiff
path: root/coverage/phystokens.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/phystokens.py')
-rw-r--r--coverage/phystokens.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/phystokens.py b/coverage/phystokens.py
index b3b0870..ed6bd23 100644
--- a/coverage/phystokens.py
+++ b/coverage/phystokens.py
@@ -85,8 +85,11 @@ def source_token_lines(source):
ws_tokens = set([token.INDENT, token.DEDENT, token.NEWLINE, tokenize.NL])
line = []
col = 0
- source = source.expandtabs(8).replace('\r\n', '\n')
+
+ # The \f is because of http://bugs.python.org/issue19035
+ source = source.expandtabs(8).replace('\r\n', '\n').replace('\f', ' ')
tokgen = generate_tokens(source)
+
for ttype, ttext, (_, scol), (_, ecol), _ in phys_tokens(tokgen):
mark_start = True
for part in re.split('(\n)', ttext):