@nertc commented on this pull request.
> + :bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\._-]+)}
+ }.freeze
+
+ NO_USERNAME_PLATFORMS = %w[discord line skype slack].freeze
+
+ def parsed
+ URL_PATTERNS.each do |platform, pattern|
+ names = url.match(pattern)
+ if names
+ return {
+ :platform => platform.to_s,
+ :name => NO_USERNAME_PLATFORMS.include?(platform.to_s) ?
platform.to_s.capitalize : names[1]
+ }
+ end
+ end
+ { :platform => nil, :name => url }
`http(s)://` is now removed in the list. I was also thinking about removing
`www.`. What do you think about it?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5439#discussion_r1962969038
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5439/review/2628888...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev