Home | History | Annotate | Download | only in extensions
      1 HTML Tidy
      2 =========
      3 
      4 Runs [HTML Tidy][] on the output of Python-Markdown using the [uTidylib][]
      5 Python wrapper. Both libtidy and uTidylib must be installed on your system.
      6 
      7 This extension is available in the standard Markdown library since version 2.0.
      8 
      9 [HTML Tidy]: http://tidy.sourceforge.net/
     10 [uTidylib]: http://utidylib.berlios.de/
     11 
     12 Note than any Tidy [options][] can be passed in as extension configs. So, 
     13 for example, to output HTML rather than XHTML, set ``output_xhtml=0``. To
     14 indent the output, set ``indent=auto`` and to have Tidy wrap the output in 
     15 ``<html>`` and ``<body>`` tags, set ``show_body_only=0``. See Tidy's 
     16 [options][] for a full list of the available options. The defaults are set to 
     17 most closely match Markdowns defaults with the exception that you get much
     18 better pretty-printing.
     19 
     20 [options]: http://tidy.sourceforge.net/docs/quickref.html
     21 
     22 Note that options set in this extension will override most any other settings
     23 passed on to Markdown (such as "output_format"). Unlike Markdown, this extension
     24 will also treat raw HTML no different than that output by Markdown. In other 
     25 words, it may munge a document authors carefully crafted HTML. Of course, it
     26 may also transform poorly formed raw HTML into nice, valid HTML. Take these
     27 things into consideration when electing to use this extension.
     28