parsers/xhtml: keep iterating on all bodies
Some checks are pending
Build / lint (push) Waiting to run
Build / test-stable (push) Blocked by required conditions
Build / test-nightly (push) Blocked by required conditions

Revert part of b522eaf7f3.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-12-15 20:39:09 +01:00
parent b522eaf7f3
commit c8f312e89d
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -26,7 +26,7 @@ impl XhtmlIm {
pub fn into_html(self) -> String { pub fn into_html(self) -> String {
let mut html = Vec::new(); let mut html = Vec::new();
// TODO: use the best language instead. // TODO: use the best language instead.
if let Some((lang, body)) = self.bodies.into_iter().next() { for (lang, body) in self.bodies {
if lang.is_empty() { if lang.is_empty() {
assert!(body.xml_lang.is_none()); assert!(body.xml_lang.is_none());
} else { } else {
@ -35,6 +35,7 @@ impl XhtmlIm {
for tag in body.children { for tag in body.children {
html.push(tag.into_html()); html.push(tag.into_html());
} }
break;
} }
html.concat() html.concat()
} }