Class: Jekyll::Tags::HighlightBlock
- Inherits:
-
Object
- Object
- Jekyll::Tags::HighlightBlock
- Defined in:
- lib/jekyll-commonmark-ghpages.rb
Instance Method Summary collapse
- #render(context) ⇒ Object
- #render_rouge(context) ⇒ Object
- #render_rouge_without_ghpages_hack ⇒ Object
- #render_without_ghpages_hack ⇒ Object
Instance Method Details
#render(context) ⇒ Object
101 102 103 104 |
# File 'lib/jekyll-commonmark-ghpages.rb', line 101 def render(context) @render_ghpages_hack_context = context render_without_ghpages_hack(context) end |
#render_rouge(context) ⇒ Object
106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/jekyll-commonmark-ghpages.rb', line 106 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 ⇒ Object
98 |
# File 'lib/jekyll-commonmark-ghpages.rb', line 98 alias render_rouge_without_ghpages_hack render_rouge |
#render_without_ghpages_hack ⇒ Object
99 |
# File 'lib/jekyll-commonmark-ghpages.rb', line 99 alias render_without_ghpages_hack render |