Class: RedQuilt::InlinePass

Inherits:
Object
  • Object
show all
Defined in:
lib/red_quilt/inline_pass.rb

Constant Summary collapse

INLINE_TARGETS =
[NodeType::PARAGRAPH, NodeType::HEADING, NodeType::TABLE_CELL].freeze

Instance Method Summary collapse

Constructor Details

#initialize(document) ⇒ InlinePass

Returns a new instance of InlinePass.



7
8
9
10
11
12
13
14
15
# File 'lib/red_quilt/inline_pass.rb', line 7

def initialize(document)
  @document = document
  @arena = document.arena
  @lexer = Inline::Lexer.new(@document.source)
  @tokens = Inline::Tokens.new
  @builder = Inline::Builder.new(@arena, @document.source, @document.references,
                                 diagnostics: @document.diagnostics,
                                 footnotes: @document.footnotes)
end

Instance Method Details

#applyObject



17
18
19
# File 'lib/red_quilt/inline_pass.rb', line 17

def apply
  visit(@document.root_id)
end