Backquotes around tags in CS comments are included when auto-linking
URL
https://www.openstreetmap.org/changeset/175766995
How to reproduce the issue?
I quite like the convention to surround tags in backquotes in comments, as a quite standard technical string indicator. However recently introduced tags auto-linking in comments includes the backquotes in the key/value pair, which means that `access=private` links to Tag:`access=private` instead of Tag:access=private.
Screenshot(s) or anything else?
No response
There is no such convention that I'm aware of - changeset comments are not, and never have been, handled as markdown so markdown syntax is not valid there.
In addition if the change you're referring to is #6597 then that isn't even live on the production site yet!
I guess #6518 is actually the change you mean? That is live.
Yeah obviously the settings are currently set to rather over-link than to under-link, but backticks can be added to the ignore-regex to account for markdown text being processed as plain text. And cases like this will come up, but since it's all in the rendering pipeline it will automatically be fixed retroactively.
Sorry, I meant “changeset discussion comment”, forgot that the term is used for both.
@tomhughes Convention is not syntax. Markdown is a (somewhat) formalized syntax that was first inspired by preexisting conventions for text-only writing and then influenced conventions in return. Granted, it might not be the most common convention, but I did use it in comments before and retroactively changing rendering to make it look bad seems wrong.
@hlfan Thanks! The set of characters used in common OSM keys is pretty limited¹, maybe that part should use a positive set instead of a negative one?
¹ Arguably even the values are limited, since this is linking to wiki pages and values with more unusual characters are probably not much documented. The proper thing to do imho would be to use the same logic as in tags tables to choose linking to full tag / key only / not at all, but this would be more work and your quick fix is a good step forward.
I did use [markdown] in comments before and retroactively changing rendering to make it look bad seems wrong
I don't believe Markdown has ever been supported in changeset discussions.
So turns out Rinku is the one including the backticks in the links:
😞
I don't believe Markdown has ever been supported in changeset discussions.
I believe what @Ltrlg means is that they have used this syntax as convention, without the expectation of it being parsed and transformed.
I feel their pain: I do the same thing everywhere, particularly with the backticks syntax. I would also be confused.
@hlfan - Would it be worth filing an issue with Rinku?
I think there are already enough years-long stale issues in the Rinku repo. Maybe just comment.
~~But perhaps we can reverse engineer a solution that makes Rinku do the thing we want, there are a few chars that Rinku considers:~~
https://github.com/vmg/rinku/blob/0e0a80bad9c270d07f4a306f9dd15ec57d28fe70/ext/rinku/utf8.c#L153
Could be a whole new can of worms... 😬