-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
When ssml_doc.embed(original_doc) is used to embed one document within another, the original document is left modified unexpectedly. This is exhibited in the following tests: sfgeorge/ruby_speech@539d2cc...bug;destructive-embed
Here's an example using ruby_speech 2.3.1...
require 'ruby_speech'
original_doc = RubySpeech::SSML.draw do
string "Hi, I'm Fred. The time is currently "
say_as :interpret_as => 'date', :format => 'dmy' do
"01/02/1960"
end
end
puts original_doc
# => <speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">Hi, I'm Fred. The time is currently <say-as interpret-as="date" format="dmy">01/02/1960</say-as></speak>
doc2 = RubySpeech::SSML.draw do
voice :gender => :male, :name => 'fred' do
embed original_doc
end
end
puts original_doc
# => <speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">Hi, I'm Fred. The time is currently </speak>Metadata
Metadata
Assignees
Labels
No labels