projects
/
m17n
/
m17n-docs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
one line /* */ type handling changed
[m17n/m17n-docs.git]
/
utils
/
usr_filter.rb
diff --git
a/utils/usr_filter.rb
b/utils/usr_filter.rb
index
5d33691
..
2bb63b0
100755
(executable)
--- a/
utils/usr_filter.rb
+++ b/
utils/usr_filter.rb
@@
-13,6
+13,8
@@
def commentblock(buf)
while gets
while gets
+# print "****", $_, "\n"
+
gsub!("@seealso", "@par See Also:")
gsub!("@errors", "@par Errors:")
gsub!("@returns", "@par Return value:")
gsub!("@seealso", "@par See Also:")
gsub!("@errors", "@par Errors:")
gsub!("@returns", "@par Return value:")
@@
-23,7
+25,7
@@
while gets
gsub!(/\$[A-Z_]+/) {|m| m.delete!("$").reverse.downcase!.concat(" b@").reverse}
case $_
gsub!(/\$[A-Z_]+/) {|m| m.delete!("$").reverse.downcase!.concat(" b@").reverse}
case $_
- when /^$/
+ when /^\s*$/
if doxy == 1
buf.push($_)
end
if doxy == 1
buf.push($_)
end
@@
-31,16
+33,22
@@
while gets
commentblock(buf)
buf = []
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
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
else
- if doxy == 0
+ if doxy == 0
commentblock(buf)
buf = []
print $_.gsub!(/\/\*\s.*\*\//," ") # should be omiited in code
end
end
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
when /\/\*{2,3}ja.*\*\// #japanese one liner
when /\/\*\*en.*\*\// #one liner
when /\/\*\*\*en.*\*\// #one liner