diff options
Diffstat (limited to 'panfry/document.py')
| -rwxr-xr-x | panfry/document.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/panfry/document.py b/panfry/document.py index eec8aea..744914c 100755 --- a/panfry/document.py +++ b/panfry/document.py @@ -69,7 +69,7 @@ class Document(object): returns: markdown source with expanded links ''' - re_link1 = re.compile(r'(\[(?P<s>[^\]^]+)\])\((?P<l>#.*)\)', re.S) + 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) source = re_link1.sub(self._get_cross_link, source) |
