Class: Redmine::WikiFormatting::Markdown::Formatter

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

Constant Summary

Constants included from LinksHelper

LinksHelper::AUTO_LINK_RE

Instance Method Summary collapse

Methods included from SectionHelper

#extract_sections, #get_section, #update_section

Methods included from LinksHelper

#auto_link!, #auto_mailto!, #restore_redmine_links

Constructor Details

#initialize(text) ⇒ Formatter

Returns a new instance of Formatter.



76
77
78
# File 'lib/redmine/wiki_formatting/markdown/formatter.rb', line 76

def initialize(text)
  @text = text
end

Instance Method Details

#to_html(*args) ⇒ Object



80
81
82
83
84
# File 'lib/redmine/wiki_formatting/markdown/formatter.rb', line 80

def to_html(*args)
  html = formatter.render(@text)
  html = inline_restore_redmine_links(html)
  html
end