X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=utils%2Fusr_filter.rb;h=05e3fe87cb4c7422bd4acede33e2c40e5b0837b6;hb=1e20e83e30b6c0aa420e2bbc937a6abdbcab1388;hp=5d336910c7413fc431bd948cd7cd6eba1cf388c5;hpb=e36f44e8303ee937fec2a6d86dbc9e573fb842a5;p=m17n%2Fm17n-docs.git diff --git a/utils/usr_filter.rb b/utils/usr_filter.rb index 5d33691..05e3fe8 100755 --- a/utils/usr_filter.rb +++ b/utils/usr_filter.rb @@ -23,17 +23,22 @@ while gets gsub!(/\$[A-Z_]+/) {|m| m.delete!("$").reverse.downcase!.concat(" b@").reverse} case $_ - when /^$/ + when /^\s*$/ if doxy == 1 buf.push($_) end - when /\/\/\/\// + when /\/\*=\*\// 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 commentblock(buf) @@ -41,6 +46,7 @@ while gets 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