Skip to content

Commit e460eef

Browse files
committed
Nokogiri deprecation warning
1 parent bb69f5e commit e460eef

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### Bug fixes
4+
5+
- Passing a Nokogiri::XML::Node as the second parameter to Node.new is deprecated [#121](https://github.com/ruby-docx/docx/pull/121)
6+
37
## v0.6.2
48

59
### Bug fixes

lib/docx/elements/element.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def html_tag(name, options = {})
9191
module ClassMethods
9292
def create_with(element)
9393
# Need to somehow get the xml document accessible here by default, but this is alright in the interim
94-
self.new(Nokogiri::XML::Node.new("w:#{self.tag}", element.node))
94+
self.new(Nokogiri::XML::Node.new("w:#{self.tag}", element.node.document))
9595
end
9696

9797
def create_within(element)

0 commit comments

Comments
 (0)