Class: Kramdown::Converter::Html

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-gl.rb

Instance Method Summary collapse

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_codeblockObject



12
# File 'lib/jekyll-gl.rb', line 12

alias_method :s_convert_codeblock, :convert_codeblock

#s_convert_hrObject



13
# File 'lib/jekyll-gl.rb', line 13

alias_method :s_convert_hr, :convert_hr

#s_format_as_block_htmlObject



10
# File 'lib/jekyll-gl.rb', line 10

alias_method :s_format_as_block_html, :format_as_block_html

#s_format_as_indented_block_htmlObject



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_htmlObject



9
# File 'lib/jekyll-gl.rb', line 9

alias_method :s_format_as_span_html, :format_as_span_html