summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrey Hunner <treyhunner@gmail.com>2011-09-30 12:57:35 -0700
committerTrey Hunner <treyhunner@gmail.com>2011-09-30 12:57:35 -0700
commit84decc5d5e4ec0f3bd2ffa5bd8b4467ee1b329a5 (patch)
tree94ff949c149f9bc45132916baf8e1b611850bb92
parent4f0bfca5bc97bee62aa036d63a0905346e14fd38 (diff)
parent16437f76ca63600e31a9e1cbe99008b60faf8dad (diff)
downloadpycco-84decc5d5e4ec0f3bd2ffa5bd8b4467ee1b329a5.tar.gz
Merge pull request #38 from irskep/patch-1
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)