aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2011-06-23 16:09:58 -0400
committerWaylan Limberg <waylan@gmail.com>2011-06-23 16:09:58 -0400
commit1a544a9552c09eb2f27b6b8c10c8b9e514171caf (patch)
tree848f213eacb158a6e93a375548ed8e8f0dcbdd2e
parent06004bd900b7425641932d27f0bb5a77fadfcff5 (diff)
downloadmarkdown-1a544a9552c09eb2f27b6b8c10c8b9e514171caf.tar.gz
markdown-1a544a9552c09eb2f27b6b8c10c8b9e514171caf.tar.bz2
markdown-1a544a9552c09eb2f27b6b8c10c8b9e514171caf.zip
Added html5 and xhtml5 output formats. These are just aliases to html4 and xhtml1 searializers respectively.
-rw-r--r--docs/using_as_module.txt6
-rw-r--r--markdown/__init__.py4
2 files changed, 8 insertions, 2 deletions
diff --git a/docs/using_as_module.txt b/docs/using_as_module.txt
index 6ac82d8..343fee0 100644
--- a/docs/using_as_module.txt
+++ b/docs/using_as_module.txt
@@ -79,12 +79,14 @@ The following options are available on the `markdown.markdown` function:
Supported formats are:
* `"xhtml1"`: Outputs XHTML 1.x. **Default**.
+ * `"xhtml5"`: Outputs XHTML style tags of HTML 5
* `"xhtml"`: Outputs latest supported version of XHTML (currently XHTML 1.1).
* `"html4"`: Outputs HTML 4
+ * `"html5"`: Outputs HTML style tags of HTML 5
* `"html"`: Outputs latest supported version of HTML (currently HTML 4).
- Note that it is suggested that the more specific formats ("xhtml1"
- and "html4") be used as "xhtml" or "html" may change in the future
+ Note that it is suggested that the more specific formats ("xhtml1",
+ "html5", & "html4") be used as "xhtml" or "html" may change in the future
if it makes sense at that time. The values can either be lowercase or
uppercase.
diff --git a/markdown/__init__.py b/markdown/__init__.py
index 89b7f9a..8bcfbc0 100644
--- a/markdown/__init__.py
+++ b/markdown/__init__.py
@@ -66,8 +66,10 @@ class Markdown:
output_formats = {
'html' : to_html_string,
'html4' : to_html_string,
+ 'html5' : to_html_string,
'xhtml' : to_xhtml_string,
'xhtml1': to_xhtml_string,
+ 'xhtml5': to_xhtml_string,
}
def __init__(self, *args, **kwargs):
@@ -83,8 +85,10 @@ class Markdown:
* extension-configs: Configuration settingis for extensions.
* output_format: Format of output. Supported formats are:
* "xhtml1": Outputs XHTML 1.x. Default.
+ * "xhtml5": Outputs XHTML style tags of HTML 5
* "xhtml": Outputs latest supported version of XHTML (currently XHTML 1.1).
* "html4": Outputs HTML 4
+ * "html5": Outputs HTML style tags of HTML 5
* "html": Outputs latest supported version of HTML (currently HTML 4).
Note that it is suggested that the more specific formats ("xhtml1"
and "html4") be used as "xhtml" or "html" may change in the future