Class: MarkdownIt::RulesCore::Block

Inherits:
Object
  • Object
show all
Defined in:
lib/motion-markdown-it/rules_core/block.rb

Class Method Summary collapse

Class Method Details

.block(state) ⇒ Object




6
7
8
9
10
11
12
13
14
15
16
# File 'lib/motion-markdown-it/rules_core/block.rb', line 6

def self.block(state)
  if state.inlineMode
    token          = Token.new('inline', '', 0)
    token.content  = state.src
    token.map      = [ 0, 1 ]
    token.children = []
    state.tokens.push(token)
  else
    state.md.block.parse(state.src, state.md, state.env, state.tokens)
  end
end