[openstreetmap/openstreetmap-website] Fix Wikipedia tag handling to support multiple links (PR #6524)

gpap notifications at github.com
Wed Nov 19 11:10:58 UTC 2025


@gergelypap commented on this pull request.



>  
-    link = wikipedia_link("foo", "Test")
-    assert_nil link
+    links = wikipedia_links("artist:wikipedia", "en:Pablo Picasso")
+    assert_equal 1, links.length
+    assert_equal "https://en.wikipedia.org/wiki/Pablo_Picasso?uselang=en", links[0][:url]
+    assert_equal "en:Pablo Picasso", links[0][:title]
+
+    links = wikipedia_links("architect:wikipedia", "en:Frank Lloyd Wright")
+    assert_equal 1, links.length
+    assert_equal "https://en.wikipedia.org/wiki/Frank_Lloyd_Wright?uselang=en", links[0][:url]
+    assert_equal "en:Frank Lloyd Wright", links[0][:title]
+
+    links = wikipedia_links("buried:wikipedia", "en:Westminster Abbey")

You're right. This is AI generated code. However I don't think it matters much, it's just a string match.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6524#discussion_r2541548620
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6524/review/3482113507 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251119/ee1f91a3/attachment.htm>


More information about the rails-dev mailing list