X-Git-Url: http://git.chise.org/gitweb/?p=m17n%2Fm17n-docs.git;a=blobdiff_plain;f=utils%2Fusr_filter.rb;h=2bb63b0366f22121d6e0195d5c34d4d113fdfda4;hp=c7762200815a339616d5e28dcd715488263d5fad;hb=3d3d7bb7f3976172462be1fbeb1dbcfa93dfb844;hpb=858c5303e612cd82c6aa2b8e29f143ef9a0eea64 diff --git a/utils/usr_filter.rb b/utils/usr_filter.rb index c776220..2bb63b0 100755 --- a/utils/usr_filter.rb +++ b/utils/usr_filter.rb @@ -33,16 +33,22 @@ while gets commentblock(buf) buf = [] - when /\/\*\s.*\*\// # /* comment */ type comment + when /^\/\*\s.*\*\// # /* comment */ type comment if doxy == 1 buf.push($_.gsub!(/\*\//, " ").gsub!(/\/\*/, "//")) # should be included only in the example code + end + + when /\/\*\s.*\*\// # code + /* comment */ type comment + if doxy == 1 + buf.push($_.gsub!(/\*\//, " ").gsub!(/\/\*/, "//")) # should be included in the example code else - if doxy == 0 + if doxy == 0 commentblock(buf) buf = [] print $_.gsub!(/\/\*\s.*\*\//," ") # should be omiited in code end end + when /\/\*{2,3}ja.*\*\// #japanese one liner when /\/\*\*en.*\*\// #one liner when /\/\*\*\*en.*\*\// #one liner