summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Johnson <diordna@gmail.com>2011-09-12 18:24:13 -0300
committerSteve Johnson <diordna@gmail.com>2011-09-12 18:24:13 -0300
commit16437f76ca63600e31a9e1cbe99008b60faf8dad (patch)
tree94ff949c149f9bc45132916baf8e1b611850bb92
parent4f0bfca5bc97bee62aa036d63a0905346e14fd38 (diff)
downloadpycco-16437f76ca63600e31a9e1cbe99008b60faf8dad.tar.gz
Fix bad handling of comments that use multiline delimiters surrounding a single line
-rw-r--r--pycco/main.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pycco/main.py b/pycco/main.py
index 67efe41..d058fcb 100644
--- a/pycco/main.py
+++ b/pycco/main.py
@@ -88,6 +88,11 @@ def parse(source, code):
else:
multi_line = False
+
+ if (multi_line
+ and line.strip().endswith(language.get("multiend"))
+ and len(line.strip()) > len(language.get("multiend"))):
+ multi_line = False
# Get rid of the delimiters so that they aren't in the final docs
line = re.sub(re.escape(language["multistart"]),'',line)