[openstreetmap/openstreetmap-website] Backquotes around tags in CS comments are included when auto-linking (Issue #6611)
Woazboat
notifications at github.com
Tue Jul 21 21:49:09 UTC 2026
Woazboat left a comment (openstreetmap/openstreetmap-website#6611)
To expand on the observed quoting behavior:
Backquotes around a tag lead to the _trailing_ quote to be included in the link: \`highway=footway\` -> \`[highway=footway`](https://wiki.openstreetmap.org/wiki/Tag:highway=footway%60)
Single quotes around a tag lead to the _leading_ quote to be included in the link: 'highway=footway' -> ['highway=footway](https://wiki.openstreetmap.org/wiki/Tag:'highway=footway)'
Double quotes are not included in the link: "highway=footway" -> "[highway=footway](https://wiki.openstreetmap.org/wiki/Tag:highway=footway)"
And the strangest behavior, a backquote in a key=value tag, directly followed by another key=value tag leads to the _expanded URL_ of the second tag being included in the link text:
\`foo=bar\`/\`blah=blub\` -> \`[foo=bar\`/\`https://wiki.openstreetmap.org/wiki/Tag:blah=blub`](https://wiki.openstreetmap.org/wiki/Tag:foo=bar%60/%60https://wiki.openstreetmap.org/wiki/Tag:blah=blub%60)
\`foo=bar\`blah=blub -> \`[foo=bar`https://wiki.openstreetmap.org/wiki/Tag:blah=blub](https://wiki.openstreetmap.org/wiki/Tag:foo=bar%60https://wiki.openstreetmap.org/wiki/Tag:blah=blub)
foo=bar\`blah=blub -> [foo=bar`https://wiki.openstreetmap.org/wiki/Tag:blah=blub](https://wiki.openstreetmap.org/wiki/Tag:foo=bar%60https://wiki.openstreetmap.org/wiki/Tag:blah=blub)
Examples/tested strings can be found here in the comments of the changeset I used for testing:
https://www.openstreetmap.org/changeset/185851593#c1629206
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6611#issuecomment-5039381847
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/6611/5039381847 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260721/74638b8b/attachment-0001.htm>
More information about the rails-dev
mailing list