[openstreetmap/openstreetmap-website] Add social profile links (PR #5439)
David Tsiklauri
notifications at github.com
Wed Feb 12 14:25:17 UTC 2025
@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/2612103633 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250212/96a9c76a/attachment.htm>
More information about the rails-dev
mailing list