I have to use at the same time parse_markdown and truncate. My text is (for example)
"Hi **boys**, I am very happy to be <a href="/here">here<a/> with you. I am so proud of you and your work."
If I use
<%= parse_markdown(truncate(@city.last_news.text, length: 30, separator: ' ')).html_safe %>
I see
Hi **boys**, I am very happy to be <a href="/here">here<a/> with you. I am so proud of you and your work.
with the markdown but without the truncate.
and if I use
<%= truncate(parse_markdown(@city.last_news.text).html_safe, length: 30, separator: ' ') %>
I see
Hi **boys**, I am very happy to be <a href="/here">here<a/> with yo...
with the truncatebut without the markdown.
How to solve?