summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrey Hunner <treyhunner@gmail.com>2012-03-28 07:13:41 -0700
committerTrey Hunner <treyhunner@gmail.com>2012-03-28 07:14:22 -0700
commitf85ead9356087cdf2f52526dbef25eaa4f1e8e38 (patch)
tree42ac0d4144c17f8d9c9785ae3abfa2bb70d98c44
parent1b08a7f057c8d71edf7cb4523c32a8081e7ae55a (diff)
downloadpycco-f85ead9356087cdf2f52526dbef25eaa4f1e8e38.tar.gz
Use non-greedy regex matching for [[hyperlinks]]
-rw-r--r--pycco/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pycco/main.py b/pycco/main.py
index 5817da4..8a3fba2 100644
--- a/pycco/main.py
+++ b/pycco/main.py
@@ -183,7 +183,7 @@ def preprocess(comment, section_nr, preserve_paths=True, outdir=None):
}
comment = re.sub('^([=]+)([^=]+)[=]*\s*$', replace_section_name, comment)
- comment = re.sub('[^`]\[\[(.+)\]\]', replace_crossref, comment)
+ comment = re.sub('[^`]\[\[(.+?)\]\]', replace_crossref, comment)
return comment