For some reason, Flash does not respect `<br>` at all, so we won't, either.

It *does*, however, respect `<sbr>` (which does the exact same thing), as well as `\n` (which makes absolutely no sense in HTML, normally that would get stripped out).
This commit is contained in:
David Wendt 2020-06-12 22:41:28 -04:00
parent efc6236cb5
commit 4f3d4c82fb
1 changed files with 2 additions and 7 deletions

View File

@ -1149,15 +1149,10 @@ impl FormatSpans {
for step in tree.as_node().walk().unwrap() {
match step {
Step::In(node)
if node.tag_name().unwrap().node_name().as_str() == "br"
|| node.tag_name().unwrap().node_name().as_str() == "sbr" =>
{
Step::In(node) if node.tag_name().unwrap().node_name().as_str() == "sbr" => {
self.replace_text(self.text.len(), self.text.len(), "\n", format_stack.last());
}
Step::Out(node)
if node.tag_name().unwrap().node_name().as_str() == "br"
|| node.tag_name().unwrap().node_name().as_str() == "sbr" => {}
Step::Out(node) if node.tag_name().unwrap().node_name().as_str() == "sbr" => {}
Step::In(node) => format_stack.push(TextFormat::from_presentational_markup(
node,
format_stack