Class: Kramdown::Converter::Html
- Inherits:
-
Object
- Object
- Kramdown::Converter::Html
- Defined in:
- lib/jekyll-gl.rb
Instance Method Summary collapse
- #add_gl_class(text) ⇒ Object
- #convert_codeblock(el, indent) ⇒ Object
- #convert_hr(el, indent) ⇒ Object
-
#format_as_block_html(name, attr, body, indent) ⇒ Object
Format the given element as block HTML.
- #format_as_indented_block_html(name, attr, body, indent) ⇒ Object
-
#format_as_span_html(name, attr, body) ⇒ Object
Format the given element as span HTML.
- #s_convert_codeblock ⇒ Object
- #s_convert_hr ⇒ Object
- #s_format_as_block_html ⇒ Object
- #s_format_as_indented_block_html ⇒ Object
- #s_format_as_span_html ⇒ Object
Instance Method Details
#add_gl_class(text) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/jekyll-gl.rb', line 15 def add_gl_class(text) if text['class'] == nil text['class'] = 'gl' else text['class'] += ' gl' end end |
#convert_codeblock(el, indent) ⇒ Object
40 41 42 43 |
# File 'lib/jekyll-gl.rb', line 40 def convert_codeblock(el, indent) add_gl_class(el.attr) s_convert_codeblock(el, indent) end |
#convert_hr(el, indent) ⇒ Object
45 46 47 48 |
# File 'lib/jekyll-gl.rb', line 45 def convert_hr(el, indent) add_gl_class(el.attr) s_convert_hr(el, indent) end |
#format_as_block_html(name, attr, body, indent) ⇒ Object
Format the given element as block HTML.
30 31 32 33 |
# File 'lib/jekyll-gl.rb', line 30 def format_as_block_html(name, attr, body, indent) add_gl_class(attr) s_format_as_block_html(name, attr, body, indent) end |
#format_as_indented_block_html(name, attr, body, indent) ⇒ Object
35 36 37 38 |
# File 'lib/jekyll-gl.rb', line 35 def format_as_indented_block_html(name, attr, body, indent) add_gl_class(attr) s_format_as_indented_block_html(name, attr, body, indent) end |
#format_as_span_html(name, attr, body) ⇒ Object
Format the given element as span HTML.
24 25 26 27 |
# File 'lib/jekyll-gl.rb', line 24 def format_as_span_html(name, attr, body) add_gl_class(attr) s_format_as_span_html(name, attr, body) end |
#s_convert_codeblock ⇒ Object
12 |
# File 'lib/jekyll-gl.rb', line 12 alias_method :s_convert_codeblock, :convert_codeblock |
#s_convert_hr ⇒ Object
13 |
# File 'lib/jekyll-gl.rb', line 13 alias_method :s_convert_hr, :convert_hr |
#s_format_as_block_html ⇒ Object
10 |
# File 'lib/jekyll-gl.rb', line 10 alias_method :s_format_as_block_html, :format_as_block_html |
#s_format_as_indented_block_html ⇒ Object
11 |
# File 'lib/jekyll-gl.rb', line 11 alias_method :s_format_as_indented_block_html, :format_as_indented_block_html |
#s_format_as_span_html ⇒ Object
9 |
# File 'lib/jekyll-gl.rb', line 9 alias_method :s_format_as_span_html, :format_as_span_html |