mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-25 15:35:13 +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
|
// inline: URL
|
||||||
|
|
||||||
url
|
url
|
||||||
= "<" url:urlFormat ">"
|
= "<" url:altUrlFormat ">"
|
||||||
{
|
{
|
||||||
return N_URL(url);
|
return N_URL(url);
|
||||||
}
|
}
|
||||||
|
@ -364,14 +364,11 @@ url
|
||||||
}
|
}
|
||||||
|
|
||||||
urlFormat
|
urlFormat
|
||||||
= "http" "s"? "://" urlContent
|
= "http" "s"? "://" urlContentPart+
|
||||||
{
|
{
|
||||||
return text();
|
return text();
|
||||||
}
|
}
|
||||||
|
|
||||||
urlContent
|
|
||||||
= urlContentPart+
|
|
||||||
|
|
||||||
urlContentPart
|
urlContentPart
|
||||||
= urlBracketPair
|
= urlBracketPair
|
||||||
/ [.,] &urlContentPart // last char is neither "." nor ",".
|
/ [.,] &urlContentPart // last char is neither "." nor ",".
|
||||||
|
@ -381,6 +378,12 @@ urlBracketPair
|
||||||
= "(" urlContentPart* ")"
|
= "(" urlContentPart* ")"
|
||||||
/ "[" urlContentPart* "]"
|
/ "[" urlContentPart* "]"
|
||||||
|
|
||||||
|
altUrlFormat
|
||||||
|
= "http" "s"? "://" (!">" CHAR)+
|
||||||
|
{
|
||||||
|
return text();
|
||||||
|
}
|
||||||
|
|
||||||
// inline: link
|
// inline: link
|
||||||
|
|
||||||
link
|
link
|
||||||
|
|
Loading…
Reference in a new issue