diff --git a/crates/rustmotion-html/src/element.rs b/crates/rustmotion-html/src/element.rs index 337c8b2e..0722aa9d 100644 --- a/crates/rustmotion-html/src/element.rs +++ b/crates/rustmotion-html/src/element.rs @@ -37,20 +37,48 @@ fn tag_kind(tag: &str) -> TagKind { } } -/// Concatenated text of an element and all its descendants. -pub(crate) fn inner_text(handle: &Handle) -> String { +/// Concatenated text of an element and all its descendants. Nested inline +/// formatting tags (`strong`/`em`/`label`/…) flatten in, matching real HTML; +/// `

"##; + let v = html_to_scenario_value(html).expect("