'Creates a new Markdown instance.
Keyword arguments:
* extensions: A list of extensions.
If they are of type string, the module mdx_name.py will be loaded.
If they are a subclass of markdown.Extension, they will be used
as-is.
* 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.
* safe_mode: Deprecated! Disallow raw html. One of "remove", "replace"
or "escape".
* html_replacement_text: Deprecated! Text used when safe_mode is set
to "replace".
* 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
* lazy_ol: Ignore number of first item of ordered lists. Default: True'

def __init__(self, *args, **kwargs):

    pos = [u'extensions', u'extension_configs', u'safe_mode', u'output_format']
    for (c, arg) in enumerate(args):
        if (pos[c] not in kwargs):
            kwargs[pos[c]] = arg
        if ((c + 1) == len(pos)):
            break
    if len(args):
        warnings.warn(u'Positional    arguments    are    deprecated    in    Markdown.    Use    keyword    arguments    only.', DeprecationWarning)
    for (option, default) in self.option_defaults.items():
        setattr(self, option, kwargs.get(option, default))
    self.safeMode = kwargs.get(u'safe_mode', False)
    if (self.safeMode and (u'enable_attributes' not in kwargs)):
        self.enable_attributes = False
    if (u'safe_mode' in kwargs):
        warnings.warn(u'"safe_mode"    is    deprecated    in    Python-Markdown.    Use    an    HTML    sanitizer    (like    Bleach    http://bleach.readthedocs.org/)    if    you    are    parsing    untrusted    markdown    text.    See    the    2.6    release    notes    for    more    info', DeprecationWarning)
    if (u'html_replacement_text' in kwargs):
        warnings.warn(u'The    "html_replacement_text"    keyword    is    deprecated    along    with    "safe_mode".', DeprecationWarning)
    self.registeredExtensions = []
    self.docType = u''
    self.stripTopLevelTags = True
    self.build_parser()
    self.references = {}
    self.htmlStash = util.HtmlStash()
    self.registerExtensions(extensions=kwargs.get(u'extensions', []), configs=kwargs.get(u'extension_configs', {}))
    self.set_output_format(kwargs.get(u'output_format', u'xhtml1'))
    self.reset()
