Skip to content

Commit

Permalink
html: Remove handling of "br" and "sbr" tags
Browse files Browse the repository at this point in the history
Seems like Flash just ignores them.
  • Loading branch information
relrelb committed Nov 13, 2021
1 parent 12e8d3a commit 2119ce9
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions core/src/html/text_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,15 +585,6 @@ impl FormatSpans {
};
let mut format = format_stack.last().unwrap().clone();
match &e.name().to_ascii_lowercase()[..] {
b"br" | b"sbr" => {
text.push('\n');
if let Some(span) = spans.last_mut() {
span.span_length += 1;
}

// Skip push to `format_stack`.
continue;
}
b"p" => match attribute(b"align").as_deref() {
Some(b"left") => format.align = Some(swf::TextAlign::Left),
Some(b"center") => format.align = Some(swf::TextAlign::Center),
Expand Down Expand Up @@ -707,10 +698,6 @@ impl FormatSpans {
}
Ok(Event::End(e)) => {
match &e.name().to_ascii_lowercase()[..] {
b"br" | b"sbr" => {
// Skip pop from `format_stack`.
continue;
}
b"p" | b"li" => {
text.push('\n');
if let Some(span) = spans.last_mut() {
Expand Down

0 comments on commit 2119ce9

Please sign in to comment.