[openstreetmap/openstreetmap-website] Fix Wikipedia tag handling to support multiple links (PR #6524)
Pablo Brasero
notifications at github.com
Wed Nov 19 12:09:28 UTC 2025
@pablobm commented on this pull request.
> + links = wikipedia_links("buried:wikipedia", "en:Westminster Abbey")
+ assert_equal 1, links.length
+ assert_equal "https://en.wikipedia.org/wiki/Westminster_Abbey?uselang=en", links[0][:url]
+ assert_equal "en:Westminster Abbey", links[0][:title]
This is a bit silly, but I'd prefer it to be corrected. When it comes to the code, it doesn't matter as it's just a text match. However for nerds like me the lack of consistency creaks. If I read this, later I may have an incorrect understanding of what the tag means when editing the map.
```suggestion
links = wikipedia_links("buried:wikipedia", "en:Stephen Hawking")
assert_equal 1, links.length
assert_equal "https://en.wikipedia.org/wiki/Stephen_Hawking?uselang=en", links[0][:url]
assert_equal "en:Stephen Hawking", links[0][:title]
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6524#pullrequestreview-3482365185
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6524/review/3482365185 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251119/d56d7a2f/attachment.htm>
More information about the rails-dev
mailing list