@hlfan commented on this pull request.
> @@ -80,10 +76,13 @@ def wikipedia_links(key, value)
# Some k/v's are wikipedia=http://en.wikipedia.org/wiki/Full%20URL
return nil if %r{^https?://}.match?(value)
+ # regex to match all language codes from de to zh-classical
+ language_code_pattern = /[a-z]{1,2}[a-z-]{0,7}[a-z]{1,3}/
I just restricted the existing inline regex to disallow hyphens at the very
start or end. This matches the current list on
https://meta.wikimedia.org/wiki/List_of_Wikipedias#All_Wikipedias_ordered_by_number_of_articles
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7136#discussion_r3370094756
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