forked from Mirrors/apostrophe
Add 'url' regexp group to LINK_ALT
Enables inline preview.github/fork/yochananmarqos/patch-1
parent
3bb813895e
commit
ec2f33e248
|
@ -13,7 +13,7 @@ CODE = re.compile(
|
|||
LINK = re.compile(
|
||||
r"\[(?P<text>.*)\]\((?P<url>.+?)(?: \"(?P<title>.+)\")?\)")
|
||||
LINK_ALT = re.compile(
|
||||
r"<(?P<text>[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*|(?:[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*))>")
|
||||
r"<(?P<text>(?P<url>[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*|(?:[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)))>")
|
||||
IMAGE = re.compile(
|
||||
r"!\[(?P<text>.*)\]\((?P<url>.+?)(?: \"(?P<title>.+)\")?\)")
|
||||
HORIZONTAL_RULE = re.compile(
|
||||
|
|
Loading…
Reference in New Issue