Add Element::into_document
It's more convenient in some cases and also makes the example code less "misleading": Now the string represents a full, correct HTML document.
This commit is contained in:
parent
b377ee2936
commit
6f0ae129fa
4 changed files with 20 additions and 10 deletions
|
|
@ -25,6 +25,7 @@ let page: String = html((
|
|||
p(("This is an example for a ", em("simple"), " web page.")),
|
||||
)),
|
||||
))
|
||||
.into_document()
|
||||
.render_to_string()
|
||||
.unwrap();
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue