4个版本 (2个破坏性版本)
0.3.0 | 2023年10月29日 |
---|---|
0.2.0 | 2023年10月28日 |
0.1.1 | 2023年10月28日 |
0.1.0 | 2023年10月28日 |
#2911 在 解析器实现 中
每月46次 下载
21KB
358 代码行
Dead Good Html To Rsx Converter
我讨厌手动将html转换为rsx。我真的很讨厌,所以我写了一个程序来帮我做这件事。它并不完美,但比手动做要好。
用法
use dead_good_html_to_rsx_converter::convert;
fn main() {
let html = r#"
<div id="hero" class="container">
<p>This is awesome!</p>
<br />
</div>
"#;
let rsx = convert(html);
println!("{}", rsx.expect("Failed to convert html to rsx"));
}
lib.rs
:
将html转换为rsx
依赖关系
~3.5–5MB
~100K SLoC