Class: Jekyll::Converters::Markdown::CommonMarkGhPages

Inherits:
CommonMark
  • Object
show all
Defined in:
lib/jekyll-commonmark-ghpages.rb

Overview

A Markdown renderer which uses JekyllCommonMarkCustomRenderer to output the final document.

Instance Method Summary collapse

Instance Method Details

#convert(content) ⇒ Object



86
87
88
89
90
91
92
93
# File 'lib/jekyll-commonmark-ghpages.rb', line 86

def convert(content)
  doc = CommonMarker.render_doc(content, @parse_options, @extensions)
  html = JekyllCommonMarkCustomRenderer.new(
    :options => @render_options,
    :extensions => @extensions
  ).render(doc)
  html.gsub(/<br data-jekyll-commonmark-ghpages>/, "\n")
end