Class: MongoidMarkdownExtension::InlineRenderer
- Inherits:
-
Redcarpet::Render::HTML
- Object
- Redcarpet::Render::HTML
- MongoidMarkdownExtension::InlineRenderer
- Includes:
- Redcarpet::Render::SmartyPants
- Defined in:
- lib/mongoid_markdown_extension/inline_renderer.rb
Instance Method Summary collapse
- #block_code(_code, _language) ⇒ Object
- #block_html(_raw_html) ⇒ Object
- #block_quote(_quote) ⇒ Object
- #footnote_def(_content, _number) ⇒ Object
- #footnotes(_content) ⇒ Object
- #header(_text, _header_level) ⇒ Object
- #hrule ⇒ Object
- #list(_contents, _list_type) ⇒ Object
- #list_item(_text, _list_type) ⇒ Object
- #postprocess(full_document) ⇒ Object
Instance Method Details
#block_code(_code, _language) ⇒ Object
7 8 9 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 7 def block_code(_code, _language) nil end |
#block_html(_raw_html) ⇒ Object
15 16 17 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 15 def block_html(_raw_html) nil end |
#block_quote(_quote) ⇒ Object
11 12 13 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 11 def block_quote(_quote) nil end |
#footnote_def(_content, _number) ⇒ Object
23 24 25 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 23 def footnote_def(_content, _number) nil end |
#footnotes(_content) ⇒ Object
19 20 21 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 19 def footnotes(_content) nil end |
#header(_text, _header_level) ⇒ Object
27 28 29 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 27 def header(_text, _header_level) nil end |
#hrule ⇒ Object
31 32 33 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 31 def hrule nil end |
#list(_contents, _list_type) ⇒ Object
35 36 37 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 35 def list(_contents, _list_type) nil end |
#list_item(_text, _list_type) ⇒ Object
39 40 41 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 39 def list_item(_text, _list_type) nil end |
#postprocess(full_document) ⇒ Object
43 44 45 46 47 48 |
# File 'lib/mongoid_markdown_extension/inline_renderer.rb', line 43 def postprocess(full_document) full_document .gsub(/(<\/p>\s*<p>)+?/, '<br><br>') .gsub(/(<\/?p>)+?/, '') .chop end |