Skip to content

Commit

Permalink
Merge pull request #114 from aozorahack/fix-accent_parser
Browse files Browse the repository at this point in the history
fix args of `Aozora2Html::Tag::Accent.new()`
  • Loading branch information
takahashim authored Feb 2, 2024
2 parents 235e623 + 5861f75 commit 50e285f
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 @@ -45,16 +45,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, use_jisx0213: @use_jisx0213)
code, name = found2[@stream.peek_char(1)]
if code
first = Aozora2Html::Tag::Accent.new(self, code, name, gaiji_dir: @gaiji_dir, use_jisx0213: @use_jisx0213)
@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, use_jisx0213: @use_jisx0213)
elsif found2.is_a?(Array)
code, name = found2[0], found2[1]
first = Aozora2Html::Tag::Accent.new(self, code, name, gaiji_dir: @gaiji_dir, use_jisx0213: @use_jisx0213)
@encount_accent = true
read_char
@chuuki_table[:accent] = true
Expand Down

0 comments on commit 50e285f

Please sign in to comment.