summaryrefslogtreecommitdiff
path: root/lib/rexml/text.rb
diff options
context:
space:
mode:
authorser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-16 19:08:03 +0000
committerser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-16 19:08:03 +0000
commitabe1214b3dd57b3a24d722ba592146db8eaabd40 (patch)
tree5fbc86b061de7618c69e6469d18805f6b376cc1d /lib/rexml/text.rb
parentdb0fac02665cb9e1e638959733e9572c845b4710 (diff)
Cross-ported the REXML changes (3.0.8) from the development branch to the
stable branch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/text.rb')
-rw-r--r--lib/rexml/text.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb
index 1d2d2dd711..388256ac81 100644
--- a/lib/rexml/text.rb
+++ b/lib/rexml/text.rb
@@ -194,7 +194,7 @@ module REXML
@raw = false
end
- def indent(string, level=1, style="\t", indentfirstline=true)
+ def indent_text(string, level=1, style="\t", indentfirstline=true)
return string if level < 0
new_string = ''
string.each { |line|
@@ -211,7 +211,7 @@ module REXML
if not (@parent and @parent.whitespace) then
s = wrap(s, 60, false) if @parent and @parent.context[:wordwrap] == :all
if @parent and not @parent.context[:indentstyle].nil? and indent > 0 and s.count("\n") > 0
- s = indent(s, indent, @parent.context[:indentstyle], false)
+ s = indent_text(s, indent, @parent.context[:indentstyle], false)
end
s.squeeze!(" \n\t") if @parent and !@parent.whitespace
end