Skip to content

Commit f3a3603

Browse files
committed
webgl_generator: Replace deprecated html2runes with html2text
1 parent 0629b7b commit f3a3603

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

webgl_generator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ khronos_api = { version = "3.1.0", path = "../khronos_api" }
2222
webidl = { version = "0.9" }
2323
heck = { version = "0.3" }
2424
RustyXML = "0.3"
25-
html2runes = "1.0"
25+
html2text = "0.15"
2626
regex = "1.3"

webgl_generator/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
//!
1818
//! See the `webgl` crate for an example of use.
1919
extern crate heck;
20-
extern crate html2runes;
20+
extern crate html2text;
2121
extern crate khronos_api;
2222
extern crate regex;
2323
extern crate webidl;

webgl_generator/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn convert_html_to_doc_comment(html: &str) -> String {
3131
// Create doc comments
3232
let doc_comment_regex = RegexBuilder::new("^").multi_line(true).build().unwrap();
3333

34-
let md = html2runes::markdown::convert_string(html);
34+
let md = html2text::from_read(std::io::Cursor::new(html), 100).unwrap();
3535
let mut doc = doc_comment_regex.replace_all(md.trim_end(), "/// ").into();
3636
doc += "\n";
3737
doc

0 commit comments

Comments
 (0)