Class: Kramdown::Parser::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/kramdown-asciidoc/kramdown_ext/parser/base.rb

Class Method Summary collapse

Class Method Details

.parse(source, options) ⇒ Array<Kramdown::Element, Array>

Overload the parse method to force value of the :auto_ids option to false.

The :auto_ids logic is handled instead by the Kramdown::AsciiDoc::Converter class

Parameters:

  • source (String)

    the Markdown source string to parse.

  • options (Hash)

    additional options to configure parsing.

Returns:

  • (Array<Kramdown::Element, Array>)

    a tuple of the document root element and a list of warning objects.



12
13
14
15
# File 'lib/kramdown-asciidoc/kramdown_ext/parser/base.rb', line 12

def self.parse source, options
  (parser = new source, (options.merge auto_ids: false, auto_id_stripping: false)).parse
  [parser.root, parser.warnings]
end