|
2 | 2 |
|
3 | 3 | Nokogiri follows [Semantic Versioning](https://semver.org/), please see the [README.md](README.md) for details. |
4 | 4 |
|
5 | | ---- |
6 | | - |
7 | | -## 1.12.4 / unreleased |
| 5 | +## 1.12.4 / 2021-08-29 |
8 | 6 |
|
9 | 7 | ### Notable fix: Namespace inheritance |
10 | 8 |
|
11 | | -Namespace behavior when reparenting nodes has historically been poorly specified and the behavior |
12 | | -diverged between CRuby and JRuby. As a result, making this behavior consistent in v1.12.0 introduced |
13 | | -a breaking change. |
| 9 | +Namespace behavior when reparenting nodes has historically been poorly specified and the behavior diverged between CRuby and JRuby. As a result, making this behavior consistent in v1.12.0 introduced a breaking change. |
14 | 10 |
|
15 | | -This patch release reverts the Builder behavior present in v1.12.0..v1.12.3 but keeps the Document |
16 | | -behavior. This release also introduces a Document attribute to allow affected users to easily change |
17 | | -this behavior for their legacy code without invasive changes. |
| 11 | +This patch release reverts the Builder behavior present in v1.12.0..v1.12.3 but keeps the Document behavior. This release also introduces a Document attribute to allow affected users to easily change this behavior for their legacy code without invasive changes. |
18 | 12 |
|
19 | 13 |
|
20 | 14 | #### Compensating Feature in XML::Document |
21 | 15 |
|
22 | | -This release of Nokogiri introduces a new `Document` boolean attribute, `namespace_inheritance`, |
23 | | -which controls whether children should inherit a namespace when they are reparented. |
24 | | -`Nokogiri::XML:Document` defaults this attribute to `false` meaning "do not inherit," thereby making |
25 | | -explicit the behavior change introduced in v1.12.0. |
| 16 | +This release of Nokogiri introduces a new `Document` boolean attribute, `namespace_inheritance`, which controls whether children should inherit a namespace when they are reparented. `Nokogiri::XML:Document` defaults this attribute to `false` meaning "do not inherit," thereby making explicit the behavior change introduced in v1.12.0. |
26 | 17 |
|
27 | | -CRuby users who desire the pre-v1.12.0 behavior may set `document.namespace_inheritance = true` before |
28 | | -reparenting nodes. |
| 18 | +CRuby users who desire the pre-v1.12.0 behavior may set `document.namespace_inheritance = true` before reparenting nodes. |
29 | 19 |
|
30 | | -See https://nokogiri.org/rdoc/Nokogiri/XML/Document.html#namespace_inheritance-instance_method for |
31 | | -example usage. |
| 20 | +See https://nokogiri.org/rdoc/Nokogiri/XML/Document.html#namespace_inheritance-instance_method for example usage. |
32 | 21 |
|
33 | 22 |
|
34 | 23 | #### Fix for XML::Builder |
35 | 24 |
|
36 | | -However, recognizing that we want `Builder`-created children to inherit namespaces, Builder now will |
37 | | -set `namespace_inheritance=true` on the underlying document for both JRuby and CRuby. This means that, on CRuby, the pre-v1.12.0 behavior is restored. |
| 25 | +However, recognizing that we want `Builder`-created children to inherit namespaces, Builder now will set `namespace_inheritance=true` on the underlying document for both JRuby and CRuby. This means that, on CRuby, the pre-v1.12.0 behavior is restored. |
38 | 26 |
|
39 | | -Users who want to turn this behavior off may pass a keyword argument to the Builder constructor like |
40 | | -so: |
| 27 | +Users who want to turn this behavior off may pass a keyword argument to the Builder constructor like so: |
41 | 28 |
|
42 | 29 | ``` ruby |
43 | 30 | Nokogiri::XML::Builder.new(namespace_inheritance: false) |
44 | 31 | ``` |
45 | 32 |
|
46 | | -See https://nokogiri.org/rdoc/Nokogiri/XML/Builder.html#label-Namespace+inheritance for example |
47 | | -usage. |
| 33 | +See https://nokogiri.org/rdoc/Nokogiri/XML/Builder.html#label-Namespace+inheritance for example usage. |
48 | 34 |
|
49 | 35 |
|
50 | 36 | #### Downstream gem maintainers |
|
0 commit comments