From 17b6fe064c3e93df5561fa181e191f37ea7f0bbf Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 10 Jun 2009 09:01:00 -0400 Subject: Expand tabs to spaces before creating HTML output. Fixes bug #6. --- coverage/html.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'coverage/html.py') diff --git a/coverage/html.py b/coverage/html.py index 7e1e544a..5d2c561c 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -140,6 +140,8 @@ class HtmlReporter(Reporter): def escape(t): """HTML-escape the text in t.""" return (t + # Change all tabs to 4 spaces. + .expandtabs(4) # Convert HTML special chars into HTML entities. .replace("&", "&").replace("<", "<").replace(">", ">") .replace("'", "'").replace('"', """) -- cgit v1.2.1