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.



63
64
65
# File 'lib/redmine/wiki_formatting/common_mark/formatter.rb', line 63

def initialize(text)
  @text = text
end

Instance Method Details

#to_html(*args) ⇒ Object



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

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