izyuumi / html2md-rs

HTML to Markdown Parser in Rust
https://crates.io/crates/html2md-rs
MIT License
10 stars 1 forks source link

Add `<html>` as node #16

Closed getreu closed 5 months ago

getreu commented 5 months ago

Is the root node <html> ... </html> recognized?

izyuumi commented 5 months ago

Good point. Since this library was made for LAME, I did not add HTML. It will come in the next update.

izyuumi commented 5 months ago

It will be released with v0.7.0.

getreu commented 5 months ago

I did a quick test with 0.7.0 and this input:

<meta http-equiv="content-type" content="text/html; charset=utf-8"><a class="_hero-button_slqo1c _yellow-button_g91299 _button_g91299" href="https://doc.rust-lang.org/cargo/getting-started/installation.html"><svg width="14" height="17" viewBox="0 0 14 17" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="_icon_slqo1c"></svg></a><a class="_hero-button_slqo1c _yellow-button_g91299 _button_g91299" href="https://doc.rust-lang.org/cargo/getting-started/installation.html">
    Install Cargo
  </a>

Produces the incorrect errror:

Error Malformed attribute: utf-8" - Missing quotation mark at around index
izyuumi commented 5 months ago

Could you create a new issue for this? I know why it’s happening and it’s not related to the html tag alone. Thank you!

izyuumi commented 5 months ago

This should be resolved in v0.7.1.