May user-friendly link names be empty?

codesoap at mailbox.org codesoap at mailbox.org
Mon Nov 8 20:29:25 GMT 2021
Hi Alex,
thanks for your response! Unfortunately your answer still leaves me
uncertain. Here you say, that trailing whitespace is illegal, if there
is no link name:

> The user friendly link name is optional, however if it is present
> then the whitespace after the url is mandatory as well.  In other words,
> the URL is mandatory, and you either have no link name and no space
> after the URL or a link name and mandatory space(s) after the URL.

The regular expression you suggest here, however, allows trailing
whitespace, even if there is no link name:

> > a) ^=>[ \t]*([^ \t]+)(?:$|[ \t]+([^ \t].*)$)
> > b) ^=>[ \t]*([^ \t]+)(?:$|[ \t]+([^ \t]?.*?)$)
> I believe the latter (option b) would be correct.  I would remove the
> final "[^ \t]?" and simplify it down to this:
>     ^=>[ \t]*([^ \t]+)(?:$|[ \t]+(.*)$)

Do you have a link to an authoritative source upon which your knowledge
on the matter is based? I wrote my initial mail on the topic, because
I'm looking for an authoritative answer rather than an opinion.

- Richard Ulmer


Archive home | About this archive