parameters: (self, *args, **kwargs)
docstring: 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
docstring_summary: Creates a new Markdown instance.
docstring_tokens: Creates a new Markdown instance .
function: def __init__(self, *args, **kwargs):
          """
          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
  
          """
  
          # For backward compatibility, loop through old positional args
          pos = ['extensions', 'extension_configs', 'safe_mode', 'output_format']
          for c, arg in enumerate(args):
              if pos[c] not in kwargs:
                  kwargs[pos[c]] = arg
              if c+1 == len(pos):  # pragma: no cover
                  # ignore any additional args
                  break
          if len(args):
              warnings.warn('Positional arguments are deprecated in Markdown. '
                            'Use keyword arguments only.',
                            DeprecationWarning)
  
          # Loop through kwargs and assign defaults
          for option, default in self.option_defaults.items():
              setattr(self, option, kwargs.get(option, default))
  
          self.safeMode = kwargs.get('safe_mode', False)
          if self.safeMode and 'enable_attributes' not in kwargs:
              # Disable attributes in safeMode when not explicitly set
              self.enable_attributes = False
  
          if 'safe_mode' in kwargs:
              warnings.warn('"safe_mode" is deprecated in Python-Markdown. '
                            'Use an HTML sanitizer (like '
                            'Bleach https://bleach.readthedocs.io/) '
                            'if you are parsing untrusted markdown text. '
                            'See the 2.6 release notes for more info',
                            DeprecationWarning)
  
          if 'html_replacement_text' in kwargs:
              warnings.warn('The "html_replacement_text" keyword is '
                            'deprecated along with "safe_mode".',
                            DeprecationWarning)
  
          self.registeredExtensions = []
          self.docType = ""
          self.stripTopLevelTags = True
  
          self.build_parser()
  
          self.references = {}
          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.reset()
function_tokens: def __init__ ( self , * args , * * kwargs ) : # For backward compatibility, loop through old positional args pos = [ 'extensions' , 'extension_configs' , 'safe_mode' , 'output_format' ] for c , arg in enumerate ( args ) : if pos [ c ] not in kwargs : kwargs [ pos [ c ] ] = arg if c + 1 == len ( pos ) : # pragma: no cover # ignore any additional args break if len ( args ) : warnings . warn ( 'Positional arguments are deprecated in Markdown. ' 'Use keyword arguments only.' , DeprecationWarning ) # Loop through kwargs and assign defaults for option , default in self . option_defaults . items ( ) : setattr ( self , option , kwargs . get ( option , default ) ) self . safeMode = kwargs . get ( 'safe_mode' , False ) if self . safeMode and 'enable_attributes' not in kwargs : # Disable attributes in safeMode when not explicitly set self . enable_attributes = False if 'safe_mode' in kwargs : warnings . warn ( '"safe_mode" is deprecated in Python-Markdown. ' 'Use an HTML sanitizer (like ' 'Bleach https://bleach.readthedocs.io/) ' 'if you are parsing untrusted markdown text. ' 'See the 2.6 release notes for more info' , DeprecationWarning ) if 'html_replacement_text' in kwargs : warnings . warn ( 'The "html_replacement_text" keyword is ' 'deprecated along with "safe_mode".' , DeprecationWarning ) self . registeredExtensions = [ ] self . docType = "" self . stripTopLevelTags = True self . build_parser ( ) self . references = { } 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 . reset ( )