class Jekyll::Tags::HighlightBlock

Public Instance Methods

render(context) click to toggle source
# File lib/jekyll-commonmark-ghpages.rb, line 98
def render(context)
  @render_ghpages_hack_context = context
  render_without_ghpages_hack(context)
end
Also aliased as: render_without_ghpages_hack
render_rouge(context) click to toggle source
# File lib/jekyll-commonmark-ghpages.rb, line 103
def render_rouge(context)
  rendered = render_rouge_without_ghpages_hack(context)

  processor = @render_ghpages_hack_context
    .registers[:site]
    .find_converter_instance(Jekyll::Converters::Markdown)
    .get_processor

  if processor.is_a?(Jekyll::Converters::Markdown::CommonMarkGhPages)
    rendered.gsub!(/\r?\n/, "<br data-jekyll-commonmark-ghpages>")
  end

  rendered
end
render_rouge_without_ghpages_hack(context)
Alias for: render_rouge
render_without_ghpages_hack(context)
Alias for: render