@hlfan commented on this pull request.


> @@ -81,9 +77,9 @@ def wikipedia_links(key, value)
     return nil if %r{^https?://}.match?(value)
 
     case key
-    when "wikipedia", /^(#{SECONDARY_WIKI_PREFIXES}):wikipedia/o
-      lang = "en"
-    when /^wikipedia:(\S+)$/
+    when /(?:^|:)wikipedia$/
+      lang = "en" if key == "wikipedia"
+    when /(?:^|:)wikipedia:(\S+)$/

Maybe tune the regex to align more with the color preview one?

```suggestion
    when /^(?>.+:)?wikipedia:(\S+)$/
```

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/7136/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to