[openstreetmap/openstreetmap-website] Add dir="auto" to Markdown content for bidi (PR #5840)

Nitai Sasson notifications at github.com
Tue Mar 25 15:04:38 UTC 2025


NeatNit left a comment (openstreetmap/openstreetmap-website#5840)

I'm considering rewriting this from scratch, with the following changes which would result in nicer code and better output:

1. Instead of subclassing the HTML converter, I will modify the document upon its creation. This would mean no longer touching the Kramdown namespace.
2. As I explain [here](https://github.com/whatwg/html/issues/10097#issuecomment-2746324449), `dir="auto"` is just not powerful enough to produce optimal results. I would like to implement server-side the algorithm I consider optimal, and set explicit `dir="ltr"` or `dir="rtl"` on each element for which it is relevant.

This would undoubtedly create the best bidi markdown implementation the world has ever seen!

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

Message ID: <openstreetmap/openstreetmap-website/pull/5840/c2751577925 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250325/d1eda385/attachment-0001.htm>


More information about the rails-dev mailing list