Class: Redmine::WikiFormatting::CommonMark::Formatter

Inherits:
Object
  • Object
show all
Includes:
SectionHelper
Defined in:
lib/redmine/wiki_formatting/common_mark/formatter.rb

Instance Method Summary collapse

Methods included from SectionHelper

#extract_sections, #get_section, #update_section

Constructor Details

#initialize(text) ⇒ Formatter

Returns a new instance of Formatter.



67
68
69
# File 'lib/redmine/wiki_formatting/common_mark/formatter.rb', line 67

def initialize(text)
  @text = text
end

Instance Method Details

#to_html(*args) ⇒ Object



71
72
73
74
# File 'lib/redmine/wiki_formatting/common_mark/formatter.rb', line 71

def to_html(*args)
  result = MarkdownPipeline.call @text
  result[:output].to_s
end