We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26523fb commit bbb6a00Copy full SHA for bbb6a00
2 files changed
lib/docx/containers/container.rb
@@ -14,7 +14,11 @@ def properties
14
def blank!
15
@node.xpath(".//w:t").each {|t| t.content = '' }
16
end
17
+
18
+ def remove!
19
+ @node.remove
20
+ end
21
22
23
-end
24
+end
spec/docx/document_spec.rb
@@ -152,6 +152,11 @@
152
@doc.paragraphs.first.blank!
153
@doc.paragraphs.first.text.should eq ''
154
155
156
+ it 'should allow content deletion' do
157
+ expect{@doc.paragraphs.first.remove!}.to change{@doc.paragraphs.size}.by(-1)
158
159
160
161
162
describe 'read formatting' do
0 commit comments