Module: MarkdownUI::Renderers::BlockQuote

Included in:
MarkdownUI::Renderer
Defined in:
lib/markdown-ui/renderers/block_quote.rb

Instance Method Summary collapse

Instance Method Details

#block_quote(text) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/markdown-ui/renderers/block_quote.rb', line 4

def block_quote(text)
  element, content = text.split(':')
  @params          = element.split

  @elements = Hash.new(MarkdownUI::Content::BasicBlock).merge(
      button:    MarkdownUI::Button::Element,
      segment:   MarkdownUI::Segment,
      grid:      MarkdownUI::Grid::Grid,
      row:       MarkdownUI::Grid::Row,
      column:    MarkdownUI::Grid::Column,
      container: MarkdownUI::Container::Element,
      buttons:   MarkdownUI::Button::Group::Buttons::Element,
      label:     MarkdownUI::Label::Element,
      span:      MarkdownUI::Content::SpanBlock,
      content:   MarkdownUI::Content::ContentBlock,
      divider:   MarkdownUI::Content::DividerBlock,
      field:     MarkdownUI::Content::FieldBlock,
      form:      MarkdownUI::Content::FormBlock,
      item:      MarkdownUI::Content::ItemBlock,
      tag:       MarkdownUI::Tag,
      menu:      MarkdownUI::Menu::Element,
      message:   MarkdownUI::Message::Element,
      input:     MarkdownUI::Content::InputBlock,
      header:    MarkdownUI::Content::HeaderBlock
  )

  html { @elements[key].new(element, content).render } if content
end