Method: MaRuKu::Out::HTML#to_html_raw_html

Defined in:
lib/maruku/output/to_html.rb

#to_html_raw_htmlObject

begin maruku_doc

Attribute: filter_html Scope: document

If true, raw HTML is discarded from the output.

end



733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
# File 'lib/maruku/output/to_html.rb', line 733

def to_html_raw_html
  return [] if get_setting(:filter_html)
  return parsed_html.to_html if parsed_html

  # If there's no parsed HTML
  raw_html = self.raw_html

  # Creates red box with offending HTML
  tell_user "Wrapping bad html in a PRE with class 'markdown-html-error'\n" +
    raw_html.gsub(/^/, '|')
  pre = xelem('pre')
  pre['style'] = 'border: solid 3px red; background-color: pink'
  pre['class'] = 'markdown-html-error'
  pre << xtext("Maruku could not parse this XML/HTML: \n#{raw_html}")
end