update alt url syntax

This commit is contained in:
marihachi 2021-06-05 16:57:56 +09:00
parent c2c629509d
commit cae709b39c

View file

@ -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