diff options
author | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-31 03:42:17 +0000 |
---|---|---|
committer | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-31 03:42:17 +0000 |
commit | f8817c7262afd77028e7cb704e440b67a1104cb7 (patch) | |
tree | e0973aeaec70eb3140b7e4fe982beb840da9cbaa /bin | |
parent | 1358ec597ba04489834c8265b554aede2ebd6c76 (diff) |
add explicit trim mode
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/erb | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -35,6 +35,8 @@ class ERB return '%>' when 2 return '%<>' + when '-' + return '%-' end end module_function :trim_mode_opt @@ -64,6 +66,10 @@ class ERB safe_level = arg.to_i when '-T' # trim mode arg = ARGV.req_arg + if arg == '-' + trim_mode = arg + next + end raise "invalid trim mode #{arg.dump}" unless arg =~ /^[0-2]$/ trim_mode = arg.to_i when '-K' # KCODE @@ -100,7 +106,7 @@ class ERB -r [library] load a library -K [kcode] specify KANJI code-set -S [safe_level] set $SAFE (0..4) - -T [trim_mode] specify trim_mode (0..2) + -T [trim_mode] specify trim_mode (0..2, -) -P disregard the lin which starts in "%" EOU exit 1 |