summaryrefslogtreecommitdiff
path: root/panfry/document.py
diff options
context:
space:
mode:
authorScott Bahling <sbahling@suse.de>2013-11-07 17:57:10 +0100
committerScott Bahling <sbahling@suse.de>2013-11-07 17:57:10 +0100
commit0ae9fa303ff901309956e30d7029f93a485068f3 (patch)
tree5e949c377fa2b9abedf3da750824bbb96824d403 /panfry/document.py
parent245eecad314b2aef0a2e35c35043d0ef8adc4eed (diff)
downloadpanfry-0ae9fa303ff901309956e30d7029f93a485068f3.tar.gz
panfry-0ae9fa303ff901309956e30d7029f93a485068f3.tar.xz
panfry-0ae9fa303ff901309956e30d7029f93a485068f3.zip
More regex fixes for the internal link processing
Diffstat (limited to 'panfry/document.py')
-rwxr-xr-xpanfry/document.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/panfry/document.py b/panfry/document.py
index 744914c..09a728d 100755
--- a/panfry/document.py
+++ b/panfry/document.py
@@ -70,8 +70,8 @@ class Document(object):
returns: markdown source with expanded links
'''
re_link1 = re.compile(r'(\[(?P<s>[^\]^]+)\])\((?P<l>#[^\)]*)\)', re.S)
- re_link2 = re.compile(r'(\[(?P<s>[^\]^]+)\][^(])', re.S)
- re_link3 = re.compile(r'(\[(?P<s>[^\]^]+)\])\[(?P<h>[^\]].*)\]', re.S)
+ re_link2 = re.compile(r'(\[(?P<s>[^\]^]+)\])\[(?P<h>[^\]]*)\]', re.S)
+ re_link3 = re.compile(r'(\[(?P<s>[^\]^]+)\][^(])', re.S)
source = re_link1.sub(self._get_cross_link, source)
source = re_link2.sub(self._get_cross_link, source)
source = re_link3.sub(self._get_cross_link, source)