diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-20 02:49:10 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-20 02:49:10 +0000 |
commit | 0d1abb904e9eda11dfed19181553725764a3d950 (patch) | |
tree | 0fc7858ebbc6c76f81249c37ce3ed0c31a8d5253 /lib/rexml/formatters/default.rb | |
parent | 0b38221d4ea75d8ac96b2adb1f7fafb0b20f9d29 (diff) | |
download | ruby-0d1abb904e9eda11dfed19181553725764a3d950.tar.gz |
rexml: upgrade to 3.1.8
See https://github.com/ruby/rexml/blob/master/NEWS.md for change summary.
Changes for spec/ has been reported: https://github.com/ruby/spec/pull/639
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/formatters/default.rb')
-rw-r--r-- | lib/rexml/formatters/default.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/rexml/formatters/default.rb b/lib/rexml/formatters/default.rb index c375f1468b..811b2ff3d5 100644 --- a/lib/rexml/formatters/default.rb +++ b/lib/rexml/formatters/default.rb @@ -1,4 +1,5 @@ # frozen_string_literal: false + module REXML module Formatters class Default @@ -101,11 +102,14 @@ module REXML end def write_instruction( node, output ) - output << Instruction::START.sub(/\\/u, '') + output << Instruction::START output << node.target - output << ' ' - output << node.content - output << Instruction::STOP.sub(/\\/u, '') + content = node.content + if content + output << ' ' + output << content + end + output << Instruction::STOP end end end |