yoshuawuyts / html

Type-safe HTML support for Rust
Apache License 2.0
247 stars 7 forks source link

Can't Place Text Elements Inside Anchor #43

Closed lsh closed 1 year ago

lsh commented 1 year ago

Thanks for this crate! It seems like AnchorChild doesn't have a .text() method for now. Ideally in the future we would be able to add elements like <li>, but for now text would allow users to workaround adding content.

yoshuawuyts commented 1 year ago

Thanks for raising this! It seems this is because of: https://github.com/yoshuawuyts/html/issues/9. The quickest fix for this is probably indeed to just white-list the Anchor element and add a text field to it. Similar to what we're planning to do for #41.