@k-yle commented on this pull request.
> @@ -0,0 +1,24 @@
+# A map of each OSM key to its formatter URL. For example:
+# { "ref:vatin" => "https://example.com/$1" }
+TAG2LINK = lambda {
+ # the JSON data is an array with duplicate entries, which is not efficient
for lookups.
+ # So, convert it to a hash and only keep the item with the best rank.
+ array = JSON.parse(Rails.root.join("node_modules/tag2link/index.json").read)
+
+ ranks = %w[deprecated normal preferred].freeze
good point, fixed
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6197#discussion_r2206938419
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6197/review/3019467...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev