forked from alemi/upub
fix(web): break <br> too
This commit is contained in:
parent
892637db04
commit
2442872b5f
1 changed files with 5 additions and 1 deletions
|
@ -142,8 +142,12 @@ fn DocumentNode(obj: serde_json::Value, #[prop(optional)] depth: usize) -> impl
|
|||
<a href=format!("/web/config/dev?q={s}")>{s}</a>
|
||||
}.into_view()
|
||||
} else {
|
||||
let pretty_string = s
|
||||
.replace("<br/>", "<br/>\n")
|
||||
.replace("<br>", "<br>\n")
|
||||
.replace('\n', &newline_replace);
|
||||
view! {
|
||||
"\""<span class="json-text"><i>{s.replace("<br/>", "<br/>\n").replace('\n', &newline_replace)}</i></span>"\""
|
||||
"\""<span class="json-text"><i>{pretty_string}</i></span>"\""
|
||||
}.into_view()
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue