diff options
| -rwxr-xr-x | panfry/document.py | 4 |
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) |
