Class: Redmine::WikiFormatting::CommonMark::Formatter
- Inherits:
-
Object
- Object
- Redmine::WikiFormatting::CommonMark::Formatter
- Includes:
- SectionHelper
- Defined in:
- lib/redmine/wiki_formatting/common_mark/formatter.rb
Instance Method Summary collapse
-
#initialize(text) ⇒ Formatter
constructor
A new instance of Formatter.
- #to_html(*args) ⇒ Object
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 |