Roundup Tracker - Issues

Message7050

Author ced
Recipients ced, rouilj
Date 2021-01-11.10:34:03
Message-id <X/wpdsdXk0e6f198@kei>
In-reply-to <1610324759.33.0.442652456285.issue2551108@roundup.psfhosted.org>
On 2021-01-11 00:25, John Rouillard wrote:
> Is:
> 
>    http://bugs.example.com/issuexyz
> 
> some third party tracker?

No.

> It should be the case that typing:
> 
>    issuexyz
> 
> should result in a hyperlink to issuexyz on the current tracker IIRC.
> If the reference is to the local issue then I think the answer is
> don't use markdown for that link.

Yes indeed. But here it is users that are mixing both way and try to do
their best.

> However, what if you want to reference an issue on a third party 
> tracker?

It works as long as the id does not exist in the current tracker.

> Do you know is this is due to a bad interaction between: 
> cgi/templating.py:c_hyper_repl_markdown
> and StringHTMLProperty::markdown? I assume that's where the call to 
> self.hyper_re.sub that you originally referenced occurs.

What happens is that _hyper_repl_markdown is called first for the
substring: `issuexyz` which replace the string by
`[[issuexyz](issuexyz)](http://bugs.example.com/issuexyz)`.

So I guess for the `id` match group, we also need to test if it is not
surrounded by `[…]` like we do for 'url' and 'email' for `<…>`.
History
Date User Action Args
2021-01-11 10:34:03cedsetrecipients: + ced, rouilj
2021-01-11 10:34:03cedlinkissue2551108 messages
2021-01-11 10:34:03cedcreate