diff --git a/README.md b/README.md index 0a9600a..c5df3ed 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,5 @@ body = html.create_element("body") body.create_text("Hello Everyone ...") print(root.serialize()) -# -# -# Hello Everyone ... -# +# Hello Everyone ... ``` diff --git a/docs/docs/parser.md b/docs/docs/parser.md index d48a565..901bb44 100644 --- a/docs/docs/parser.md +++ b/docs/docs/parser.md @@ -89,14 +89,9 @@ title.text() title.parent.name # QualName(local="head", ns="http://www.w3.org/1999/xhtml", prefix=None) -ul = root.select_one("ul") -ul.serialize() -# +li = root.select_one("li") +li.serialize() +#
  • Example Website
  • ``` !!! tip "Common task" @@ -128,6 +123,28 @@ root.serialize() # ``` +!!! warning "Pretty-printing" + + Pass `indent` to pretty-print the output, indenting each level of elements by that many spaces: + ```python + root.serialize(indent=4) + # + # + # + # Incomplete Html + # + # + #