Skip to content

Commit

Permalink
ignore 字詰め, 割り注
Browse files Browse the repository at this point in the history
  • Loading branch information
takahashim committed Jan 9, 2011
1 parent 8c1993b commit 2b5d868
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/aozora4reader.rb
Expand Up @@ -592,6 +592,22 @@ def main
line.gsub!(/[#ページの左右中央]/, "")
end

## XXX 字詰めは1行の文字数が少ないので無視
if line =~ /[#ここから([1234567890一二三四五六七八九〇十]*)字詰め]/
line.gsub!(/[#ここから([1234567890一二三四五六七八九〇十]*)字詰め]/, "")
end
if line =~ /[#ここで字詰め終わり]/
line.gsub!(/[#ここで字詰め終わり]/, "")
end

# XXX 割り注も無視
if line =~ /[#ここから割り注]/
line.gsub!(/[#ここから割り注]/, "")
end
if line =~ /[#ここで割り注終わり]/
line.gsub!(/[#ここで割り注終わり]/, "")
end

if line =~ /[#「(.*?)」は太字]/
line.gsub!(/(.+)[#「\1」は太字]/,'{\\textbf{\1}}')
end
Expand Down

0 comments on commit 2b5d868

Please sign in to comment.