### Description
1. Derive a kramdown converter subclass that adds `dir="auto"` to 
HTML elements where appropriate.
2. Call this new converter instead of the default HTML converter
3. Add `dir="auto"` to changeset comment tag (unrelated, should have 
been part of #5835)

This solves the last (to my knowledge) of the most prominent user-generated 
content bidi issues of #3428, that being user diaries. Other less prominent 
issues are handled in #3429, which best I can tell does not overlap with this 
PR.

### How has this been tested?
The kramdown subclass was tested here: 
https://codeberg.org/NeatNit/kramdown-bidi/src/branch/main/code.rb

Its integration into the OpenStreetMap website **has not been tested.**

I don't expect you'd like the amount of comments in that converter, or 
that github issue comment link in the source code. In my opinion it's 
needed to understand the choices I've made. If you prefer, I can remove 
some of the comments, just tell me which ones.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5840

-- Commit Summary --

  * add dir="auto" to changeset comment
  * make markdown bidirectional with dir="auto"

-- File Changes --

    M app/views/changesets/show.html.erb (2)
    M lib/rich_text.rb (42)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5840.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5840.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to