diff options
author | Aaron Blohowiak <aaron.blohowiak@gmail.com> | 2010-12-13 00:22:29 -0800 |
---|---|---|
committer | Maximillian Dornseif <md@hudora.de> | 2011-01-21 08:25:55 +0100 |
commit | 052ccc5c2c455a938ba97ad9e76e25c7b1c79283 (patch) | |
tree | d244fff2ed42f3c33826987b35c997b511a3fee9 | |
parent | 83805b64aed5bf2c366e074184e21fc289e07870 (diff) | |
download | pycco-052ccc5c2c455a938ba97ad9e76e25c7b1c79283.tar.gz |
make JS work by escaping the start and end symbols
-rw-r--r-- | pycco/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pycco/main.py b/pycco/main.py index 4daf745..67efe41 100644 --- a/pycco/main.py +++ b/pycco/main.py @@ -90,8 +90,8 @@ def parse(source, code): multi_line = False # Get rid of the delimiters so that they aren't in the final docs - line = re.sub(language["multistart"],'',line) - line = re.sub(language["multiend"],'',line) + line = re.sub(re.escape(language["multistart"]),'',line) + line = re.sub(re.escape(language["multiend"]),'',line) docs_text += line.strip() + '\n' if has_code and docs_text.strip(): |