Implement `sbr` tags.
No, I don't know what they are either, but at least one movie exists which treats them like `br`, so we'll treat them like that, too.
This commit is contained in:
parent
9e56f10fd0
commit
1966ec5cb1
|
@ -1149,10 +1149,15 @@ impl FormatSpans {
|
||||||
|
|
||||||
for step in tree.as_node().walk().unwrap() {
|
for step in tree.as_node().walk().unwrap() {
|
||||||
match step {
|
match step {
|
||||||
Step::In(node) if node.tag_name().unwrap().node_name().as_str() == "br" => {
|
Step::In(node)
|
||||||
|
if node.tag_name().unwrap().node_name().as_str() == "br"
|
||||||
|
|| node.tag_name().unwrap().node_name().as_str() == "sbr" =>
|
||||||
|
{
|
||||||
self.replace_text(self.text.len(), self.text.len(), "\n", format_stack.last());
|
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" => {}
|
Step::Out(node)
|
||||||
|
if node.tag_name().unwrap().node_name().as_str() == "br"
|
||||||
|
|| node.tag_name().unwrap().node_name().as_str() == "sbr" => {}
|
||||||
Step::In(node) => format_stack.push(TextFormat::from_presentational_markup(
|
Step::In(node) => format_stack.push(TextFormat::from_presentational_markup(
|
||||||
node,
|
node,
|
||||||
format_stack
|
format_stack
|
||||||
|
|
Loading…
Reference in New Issue