Class: Kramdown::Converter::RTL

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

Instance Method Summary collapse

Instance Method Details

#add_code_tags(code) ⇒ Object



36
37
38
39
# File 'lib/jekyll-markright.rb', line 36

def add_code_tags(code)
  code = code.sub(/<pre>/,'<pre><code dir="ltr">')
  code = code.sub(/<\/pre>/,"</code></pre>")
end

#convert_codeblock(el, indent) ⇒ Object



22
23
24
25
26
27
# File 'lib/jekyll-markright.rb', line 22

def convert_codeblock(el, indent)
  if not el.attr['dir']
    el.attr['dir'] = 'ltr'
  end
  return super(el, indent)
end

#convert_codespan(el, indent) ⇒ Object



29
30
31
32
33
34
# File 'lib/jekyll-markright.rb', line 29

def convert_codespan(el, indent)
  if not el.attr['dir']
    el.attr['dir'] = 'ltr'
  end
  return super(el, indent)
end