mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-21 21:55:09 +00:00
update alt url syntax
This commit is contained in:
parent
c2c629509d
commit
cae709b39c
1 changed files with 8 additions and 5 deletions
|
@ -354,7 +354,7 @@ hashtagChar
|
|||
// inline: URL
|
||||
|
||||
url
|
||||
= "<" url:urlFormat ">"
|
||||
= "<" url:altUrlFormat ">"
|
||||
{
|
||||
return N_URL(url);
|
||||
}
|
||||
|
@ -364,14 +364,11 @@ url
|
|||
}
|
||||
|
||||
urlFormat
|
||||
= "http" "s"? "://" urlContent
|
||||
= "http" "s"? "://" urlContentPart+
|
||||
{
|
||||
return text();
|
||||
}
|
||||
|
||||
urlContent
|
||||
= urlContentPart+
|
||||
|
||||
urlContentPart
|
||||
= urlBracketPair
|
||||
/ [.,] &urlContentPart // last char is neither "." nor ",".
|
||||
|
@ -381,6 +378,12 @@ urlBracketPair
|
|||
= "(" urlContentPart* ")"
|
||||
/ "[" urlContentPart* "]"
|
||||
|
||||
altUrlFormat
|
||||
= "http" "s"? "://" (!">" CHAR)+
|
||||
{
|
||||
return text();
|
||||
}
|
||||
|
||||
// inline: link
|
||||
|
||||
link
|
||||
|
|
Loading…
Reference in a new issue