Module: CommonMarker::Rouge

Defined in:
lib/commonmarker/rouge.rb,
lib/commonmarker/rouge/version.rb

Constant Summary collapse

VERSION =
'1.2.0'

Class Method Summary collapse

Class Method Details

.render_doc(text, cmark_options = :DEFAULT, **highmark_options) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/commonmarker/rouge.rb', line 11

def render_doc(text, cmark_options = :DEFAULT, **highmark_options)
  cmark = highmark_options[:cmark_class] || ::CommonMarker

  ast = cmark.render_doc(text, cmark_options)
  process_ast(ast, highmark_options)
  ast
end

.render_html(text, cmark_options = :DEFAULT) ⇒ Object



19
20
21
# File 'lib/commonmarker/rouge.rb', line 19

def render_html(text, cmark_options = :DEFAULT)
  render_doc(text, cmark_options).to_html
end