[openstreetmap/openstreetmap-website] Add URL prettification for plain texts (PR #6518)

Pablo Brasero notifications at github.com
Fri Nov 21 13:37:11 UTC 2025


pablobm left a comment (openstreetmap/openstreetmap-website#6518)

Thank you, that explanation and the changes to the config are helpful. I had a more in-depth look this morning, and I've been playing with how to make this better. The code is difficult to follow, which is common with this sort of thing, but it's not unavoidable. For example, I rewrote the `linkify` method to show the steps more clearly, and moved the `Rinku.autolink_block` into a separate method. See: https://github.com/hlfan/openstreetmap-website/compare/prettify-urls...pablobm:openstreetmap-website:prettify-urls (Feel free to take from there).

Would you be able to do something similar with `expand_link_shorthands` and `format_link_text`? They are not the easiest to read currently.

(Oh, and also I added a test for something that wasn't tested.(

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6518#issuecomment-3563065838
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6518/c3563065838 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251121/832ef96f/attachment-0001.htm>


More information about the rails-dev mailing list