lib/nokogiri/xml/builder.rb in nokogiri-maglev--1.5.0.1 vs lib/nokogiri/xml/builder.rb in nokogiri-maglev--1.5.2
- old
+ new
@@ -304,10 +304,16 @@
end
###
# Create a CDATA Node with content of +string+
def cdata string
- insert(doc.create_cdata(string))
+ insert doc.create_cdata(string)
+ end
+
+ ###
+ # Create a Comment Node with content of +string+
+ def comment string
+ insert doc.create_comment(string)
end
###
# Build a tag that is associated with namespace +ns+. Raises an
# ArgumentError if +ns+ has not been defined higher in the tree.