Are there each newline convert to each br tags?


I’m looking for each newline convert to each br tags function.

text_to_html function is two or more newlines convert to one p tag. but I want to output two or more br tags.
Are there solutions?
I apologize if this is in the documentation and I’m missing it.

(I’m sorry if my English is wrong)

|> String.split("\n", trim: false) 
|> Enum.intersperse(Phoenix.HTML.Tag.tag(:br))

thank you so much!!

this is solution what I’m looking for.
thanks !!