@AntonKhorev commented on this pull request.
> @@ -2,7 +2,7 @@
<%= render :partial => "diary_entry_heading", :object => diary_entry, :as =>
"diary_entry" %>
<div class="richtext text-break" xml:lang="<%= diary_entry.language_code %>"
lang="<%= diary_entry.language_code %>">
- <%= diary_entry.body.to_html %>
+ <%= truncated ? diary_entry.truncated_body(1000).to_html :
diary_entry.body.to_html %>
First markdown from the RichText object is converted to html. Then html is
processed by `truncated_body` and a new RichText object is constructed. Then
html is again extracted from that object. And if the html is nontrivial it may
get mangled in the process, turning, for example, this
```
There's a table below:
| thing | 42 | an important thing |
| thing | 43 | an important thing |
```

into this

--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5121#pullrequestreview-2427014169
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5121/review/2427014...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev