Changelog History
Page 2
-
v2.11 Changes
September 07, 2017๐ Various Ruby warnings have been resolved by Loic Nageleisen. See pull request https://gitlab.com/yorickpeterse/oga/pull/180 for more information.
-
v2.10 Changes
April 18, 2017๐ Fix
Element#attribute
for HTML documents when using Symbol argumentsYou can now pass a Symbol to
Oga::XML::Element#attribute
for both XML and HTML ๐ documents, previously this only worked for XML documents. See PR #174 for more information. -
v2.9 Changes
February 10, 2017Closing tags for HTML void elements
Certain HTML elements such as
<img>
and<link>
(called "void elements" in Oga) are now closed using a>
tag instead of/>
. In other words, instead of outputting<img src="..." />
Oga now outputs<img src="...">
.Doctypes are now Nodes
๐ Each Doctype now inherits from
Oga::XML::Node
. This makes it possible to parse documents where a doctype is located in a child node. However, in these cases Oga will not populateOga::XML::Document#doctype
as this can not be done in an efficient way. -
v2.8 Changes
January 04, 2017๐ Ruby 2.4 deprecates Fixnum in favour of Integer, producing warnings whenever ๐ Fixnum is used. Oga 2.8 contains a fix contributed by Po Shan Cheah to remove ๐ these deprecation warnings. See commit c75ca96d229a50b369e16057622255a674f2cabc for more information.
-
v2.7 Changes
September 27, 2016Closing Elements When Generating XML
When generating XML Oga now properly closes elements with siblings but without ๐ children. See commit e0e0687dc29427c854c9fa6d3c19cee1c04f92c7 for more information.
๐ Newlines After Doctypes
When generating XML a newline would be inserted after a doctype. If another ๐ newline would follow in a text node this would lead to multiple newlines being ๐ present. Oga now ensures there is only 1 newline following a doctype. See commit e0e0687dc29427c854c9fa6d3c19cee1c04f92c7 for more information.
๐ Processing Instructions With Namespace Prefixes
๐ The XML lexer now supports processing instructions containing namespace prefixes ๐ such as
<?xml:foo ?>
. See commit 01fa1513f4bd6f194bf6d1ca17e510003fa23312 for more information.XML Declarations Are Now Processing Instructions
The class
Oga::XML::XmlDeclaration
now extendsOga::XML::ProcessingInstruction
. This allows documents to contain XML declarations in nested elements, instead of only allowing this at the root of ๐ the document. See commit 116b9b0ceb6feab4daa0bb417302590fba948bef for more information.Aliases For Getting & Setting Attributes
The methods
Oga::XML::Element#get
andOga::XML::Element#set
are now aliased ๐ as#[]
and#[]=
respectively. See d40baf0c724a3874f43100fbefa775cfb8dcacda for more information and thanks to Scott Wheeler for contributing the patch. -
v2.6 Changes
September 10, 2016๐ This release fixes a bug in the XML generation code that would cause it to get ๐ stuck in the generation loop. See issue https://gitlab.com/yorickpeterse/oga/issues/161 and commit 38284278d542640c3d8300ef15890af93b6df779 for more information.
-
v2.5 Changes
September 06, 2016๐ This release fixes a bug in the XML parser that would prevent it from parsing doctypes that contain a mixture of public/system IDs, a name, and inline rules.
๐ See issue https://gitlab.com/yorickpeterse/oga/issues/159 and commit 68f1f9f660b90a43d22c8514e8cbf53f7ca0097d for more information.
-
v2.4 Changes
September 04, 2016Serialising Large Documents
Oga can now serialise large documents without causing the call stack to overflow thanks to the new
Oga::XML::Generator
class. This class can generate XML without using a stack at all.๐ See issue https://gitlab.com/yorickpeterse/oga/issues/158 and commit dd138981f68a606eff5d5a01e990f04398087dc4 for more information.
Faster retrieval of previous/next nodes
The methods
Oga::XML::Node#previous
andOga::XML::Node#next
now simply return the value of an instance variable instead of calculating the ๐ previous/next node on the fly. This greatly improves the performance of these methods at the cost of a bit of extra work when adding or removing nodes from a NodeSet.๐ See commit 5a58b1413767fed4518e8a67c4eb432a31592660 for more information.
-
v2.3 Changes
July 13, 2016Thanks to various changes provided by Erik Michaels-Ober Oga can now be used to ๐ parse XML input from a pipe (as returned by for example
IO.pipe
). See the following pull request for more information: https://gitlab.com/yorickpeterse/oga/pull/154. -
v2.2 Changes
February 23, 2016๐ XPath support for nested pipe operators
๐ Nested pipe operators such as
a | b | c
are now supported as XPath ๐ expressions. See issue https://gitlab.com/yorickpeterse/oga/issues/149 and commit 6d3c5c2ce93cbce337338bdc1a4971da72517038 for more information.