diff options
author | Andrey Makarov <ph.makarov@gmail.com> | 2023-08-14 22:27:36 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-15 06:27:36 +0200 |
commit | a660c17d309e2b077c610fd8c8c697944cff676d (patch) | |
tree | 054ef224e4088c4a376cad7c7ca508086e358024 /lib/pure/htmlparser.nim | |
parent | 1927ae72d093d5e13bef6fd3fdf4700aa072f6bc (diff) | |
download | Nim-a660c17d309e2b077c610fd8c8c697944cff676d.tar.gz |
Markdown code blocks migration part 8 (#22478)
Diffstat (limited to 'lib/pure/htmlparser.nim')
-rw-r--r-- | lib/pure/htmlparser.nim | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/pure/htmlparser.nim b/lib/pure/htmlparser.nim index 24eab3abb..0de384a8e 100644 --- a/lib/pure/htmlparser.nim +++ b/lib/pure/htmlparser.nim @@ -12,10 +12,9 @@ ## ## It can be used to parse a wild HTML document and output it as valid XHTML ## document (well, if you are lucky): -## -## .. code-block:: Nim -## +## ```Nim ## echo loadHtml("mydirty.html") +## ``` ## ## Every tag in the resulting tree is in lower case. ## @@ -29,9 +28,7 @@ ## and write back the modified version. In this case we look for hyperlinks ## ending with the extension `.rst` and convert them to `.html`. ## -## .. code-block:: Nim -## :test: -## +## ```Nim test ## import std/htmlparser ## import std/xmltree # To use '$' for XmlNode ## import std/strtabs # To access XmlAttributes @@ -48,6 +45,7 @@ ## a.attrs["href"] = dir / filename & ".html" ## ## writeFile("output.html", $html) +## ``` import strutils, streams, parsexml, xmltree, unicode, strtabs |