Commit 0ec601f
committed
Remove fn parse() from public API and replace with pub fn do_parse() method on Config
The parse function is an odd one in the current API, other functions
can be separated cleanly into functions that are convenient and functions
that need to be configured. The parse function does not advertise what
configuration it uses, and will silently drop css information, as it parses
with config::plain() as default configuration. This can lead to the following
misuse of the public API
let render_tree = parse(html)?;
customcfg.render_to_string(render_tree, 80)?;1 parent e9786ac commit 0ec601f
1 file changed
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2370 | 2370 | | |
2371 | 2371 | | |
2372 | 2372 | | |
2373 | | - | |
2374 | | - | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
2375 | 2376 | | |
2376 | 2377 | | |
2377 | 2378 | | |
| |||
2660 | 2661 | | |
2661 | 2662 | | |
2662 | 2663 | | |
2663 | | - | |
2664 | | - | |
2665 | | - | |
2666 | | - | |
2667 | | - | |
2668 | 2664 | | |
2669 | 2665 | | |
2670 | 2666 | | |
| |||
0 commit comments