aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'markdown/core.py')
-rw-r--r--markdown/core.py22
1 files changed, 4 insertions, 18 deletions
diff --git a/markdown/core.py b/markdown/core.py
index 7424781..f4111e4 100644
--- a/markdown/core.py
+++ b/markdown/core.py
@@ -26,7 +26,6 @@ class Markdown(object):
doc_tag = "div" # Element used to wrap document - later removed
option_defaults = {
- 'html_replacement_text': '[HTML_REMOVED]',
'tab_length': 4,
'enable_attributes': True,
'smart_emphasis': True,
@@ -35,11 +34,7 @@ class Markdown(object):
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, **kwargs):
@@ -55,17 +50,8 @@ class Markdown(object):
no class is specified, then a `makeExtension` function is called within the specified module.
* extension_configs: Configuration settings 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
- if it makes sense at that time.
+ * "xhtml": Outputs XHTML style tags. Default.
+ * "html": Outputs HTML style tags.
* tab_length: Length of tabs in the source. Default: 4
* enable_attributes: Enable the conversion of attributes. Default: True
* smart_emphasis: Treat `_connected_words_` intelligently Default: True
@@ -90,7 +76,7 @@ class Markdown(object):
self.htmlStash = util.HtmlStash()
self.registerExtensions(extensions=kwargs.get('extensions', []),
configs=kwargs.get('extension_configs', {}))
- self.set_output_format(kwargs.get('output_format', 'xhtml1'))
+ self.set_output_format(kwargs.get('output_format', 'xhtml'))
self.reset()
def build_parser(self):
@@ -196,7 +182,7 @@ class Markdown(object):
def set_output_format(self, format):
""" Set the output format for the class instance. """
- self.output_format = format.lower()
+ self.output_format = format.lower().rstrip('145') # ignore num
try:
self.serializer = self.output_formats[self.output_format]
except KeyError as e: