Class: Kramdown::Parser::Html::ElementConverter

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

Instance Method Summary collapse

Instance Method Details

#convert_br(el) ⇒ void

This method returns an undefined value.

Overload the convert_br method to add the :html_tag option to indicate this element originates from an HTML tag.

Parameters:

  • el (Kramdown::Element)

    The element that represents an HTML br tag.



9
10
11
12
13
14
# File 'lib/kramdown-asciidoc/kramdown_ext/parser/html.rb', line 9

def convert_br el
  el.options.replace location: el.options[:location], html_tag: true
  el.type = el.value.to_sym
  el.value = nil
  nil
end