Skip to content

Commit

Permalink
fix args of Aozora2Html::Tag::Accent.new
Browse files Browse the repository at this point in the history
  • Loading branch information
takahashim committed Feb 1, 2024
1 parent 3ec075f commit 258580c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/aozora2html/accent_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@ def parse
found2 = found[@stream.peek_char(0)]
if found2
if found2.is_a?(Hash)
found3 = found2[@stream.peek_char(1)]
if found3
first = Aozora2Html::Tag::Accent.new(self, *found3, gaiji_dir: @gaiji_dir)
code, name = found2[@stream.peek_char(1)]
if code
first = Aozora2Html::Tag::Accent.new(self, code, name, gaiji_dir: @gaiji_dir)
@encount_accent = true
@chuuki_table[:accent] = true
read_char
read_char
end
elsif found2
first = Aozora2Html::Tag::Accent.new(self, *found2, gaiji_dir: @gaiji_dir)
elsif found2.is_a?(Array)
code, name = found2[0], found2[1]
first = Aozora2Html::Tag::Accent.new(self, code, name, gaiji_dir: @gaiji_dir)
@encount_accent = true
read_char
@chuuki_table[:accent] = true
Expand Down

0 comments on commit 258580c

Please sign in to comment.