-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hi, I was testing the extractor with the below code, and it seems like it's extracting the style tag as text instead of treating it as css feature.
fn main() {
let string = r##"
<html lang="en">
<svg class="wds-icon" viewBox="0 0 233 315.24" xmlns="http://www.w3.org/2000/svg">
<defs>
<style>.cls-1{fill:#cb0054;}</style>
</defs>
<g transform="translate(-83.5,-42.38)">
<rect class="cls-1" x="153.84" y="204.81" width="13.71" height="13.71"/>
</g>
</svg>
</html>"##;
let text = html2text::config::with_decorator(TrivialDecorator::new())
.string_from_read(string.as_bytes(), usize::MAX).unwrap();
println!("Extracted text: {}", text); //Extracted text: .cls-1{fill:#cb0054;}
}
Is there anything I could do to disable this behavior?
Metadata
Metadata
Assignees
Labels
No labels