Module: OMF::Web::Widget::Text::Maruku
- Defined in:
- lib/omf-web/widget/text/maruku.rb
Defined Under Namespace
Classes: WidgetElement
Constant Summary collapse
- OpenMatch =
/^\s*\{\{\{\s*(.*)$/
- CloseMatch =
/(.*)\}\}\}/
Class Method Summary collapse
- .format_content(content) ⇒ Object
-
.format_content_proxy(content_proxy) ⇒ Object
Fetch text and parse it.
Class Method Details
.format_content(content) ⇒ Object
41 42 43 |
# File 'lib/omf-web/widget/text/maruku.rb', line 41 def self.format_content(content) ::Maruku.new(content) end |
.format_content_proxy(content_proxy) ⇒ Object
Fetch text and parse it
34 35 36 37 38 39 |
# File 'lib/omf-web/widget/text/maruku.rb', line 34 def self.format_content_proxy(content_proxy) unless content_proxy.is_a? OMF::Web::ContentProxy raise "Expected content proxy, but got '#{content_proxy.class}'" end format_content(content_proxy.content) end |