@nertc commented on this pull request.
> + :substack => %r{substack\.com/@([a-zA-Z0-9_-]+)},
+ :telegram => %r{t\.me/([a-zA-Z0-9_]+)},
+ :threads => %r{threads\.net/@([a-zA-Z0-9_]+)},
+ :tiktok => %r{tiktok\.com/@([a-zA-Z0-9_]+)},
+ :twitch => %r{twitch\.tv/([a-zA-Z0-9_]+)},
+ :twitter_x => %r{(?:twitter|x)\.com/([a-zA-Z0-9_]+)},
+ :vimeo => %r{vimeo.com/([a-zA-Z0-9_]+)},
+ :whatsapp => %r{wa\.me/(\d+)},
+ :youtube => %r{youtube\.com/@([a-zA-Z0-9_-]+)}
+ }.freeze
+
+ NO_USERNAME_PLATFORMS = %w[discord line skype slack].freeze
+
+ def parsed
+ URL_PATTERNS.each do |platform, pattern|
+ username = url.match(pattern)
It is named `names`, because it will either be `null` or array that will
contain one element (user's name). Naming it `name` would cause to interpret it
as a string or other single object variable, while naming it `names` emphasizes
that it is an array that contains a name of the user.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5439#discussion_r1952757827
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5439/review/2612103...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev