Class: FujiMarkdown::Postprocessors::Ruby

Inherits:
Object
  • Object
show all
Defined in:
lib/fuji_markdown/postprocessors/ruby.rb

Constant Summary collapse

KANJI_REGEXP =
/\A[一-龠々]+\z/.freeze

Instance Method Summary collapse

Constructor Details

#initialize(omit_start_symbol: false) ⇒ Ruby

Returns a new instance of Ruby.



8
9
10
11
# File 'lib/fuji_markdown/postprocessors/ruby.rb', line 8

def initialize(omit_start_symbol: false)
  @ruby              = false
  @omit_start_symbol = omit_start_symbol
end

Instance Method Details

#call(doc) ⇒ Object



13
14
15
16
17
# File 'lib/fuji_markdown/postprocessors/ruby.rb', line 13

def call(doc)
  doc.walk do |node|
    process_ruby_node!(node) if node.type == :inline_html
  end
end