makiri 0.12.1-aarch64-linux → 0.13.0-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dad06ebaa7e4fa5fec68080e1714a5be6b72dc89172ff5f1f7840d6e73f4cffe
4
- data.tar.gz: fe535f36f6d2f28acd4b3bd6c40f2d2f5c1a288affe5dc94ddd22d520c4e8ae7
3
+ metadata.gz: c38568d5e92468d6f4da1275cf823cdc615d079c6a0293236ad5c85897647df1
4
+ data.tar.gz: 33701440893a286012dcdba48d78cd30d69af8d27fff9bc3691603e5e4151900
5
5
  SHA512:
6
- metadata.gz: 444bfeb89cb88fe1e3bed19008401e0c8f09043e803722c4dac63c88063a53eaa8a9e097b08f5b11c25f83a76e4d5f7630d99846c4f1c9131feafb72351a17aa
7
- data.tar.gz: c296890d6e35f332fb975542d2eebe5dd7b4283cbc3012715c43a37917aa82d40492136fe045ab44362e26572b09b3e1f9dc52b9f059d40d1fa93f3f25d5e11c
6
+ metadata.gz: '0586c38ca0fbbac3cc9da9d3147db3d58c2f1380991a06bf412f17d92029023fbfca96289c91b8bfc30a1a25e1a26a8df8e8e5ada81cbfaf62074eae396868d1'
7
+ data.tar.gz: 85f351046a3e65e9e0c8f8d725b5aa585555f6055798f4d80ace09fe16f8ef28b8f00124ac9ce7de3e5e1047ae0b01cf263636f712818d402600bc0e996b1e9f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.13.0] - 2026-10-03
4
+
5
+ ### Added
6
+
7
+ * `Document#tree_version` (HTML and XML): an Integer that increases whenever
8
+ a child list in the document changes - nodes added, removed or replaced,
9
+ `inner_html=`, `content=`, and both documents when a node moves between
10
+ them. Attribute changes leave it as it is, so it can key a cache of child
11
+ lists.
12
+ * `Element#attribute_value_ns(ns, local)` and `#attribute_node_ns(ns, local)`
13
+ (HTML and XML): the attribute's value or Attr node by namespace and local
14
+ name, like the DOM's `getAttributeNS` / `getAttributeNodeNS`. `nil` or `""`
15
+ means no namespace.
16
+ * `Element#set_loose_dom_attribute(name, value)` now works on HTML nodes too.
17
+ Like the DOM's `setAttribute`, it sets an attribute in no namespace whose
18
+ name may contain a colon (`v-on:click`).
19
+
20
+ ### Fixed
21
+
22
+ * HTML documents keep namespace URIs as written. `create_element_ns`,
23
+ `set_attribute_ns` and `import_node` lower-cased them (`fooNamespace` read
24
+ back as `foonamespace`), and a differently cased XHTML namespace URI made
25
+ an HTML element.
26
+
3
27
  ## [0.12.1] - 2026-10-02
4
28
 
5
29
  ### Fixed
data/README.md CHANGED
@@ -50,7 +50,7 @@ doc = Makiri::HTML(<<~HTML)
50
50
  </body></html>
51
51
  HTML
52
52
 
53
- # CSS selectors (Lexbor's selector engine)
53
+ # CSS selectors (Lexbor's selector parser, Makiri's own matcher)
54
54
  doc.css("a").map { |a| a["href"] } # => ["/a", "/b"]
55
55
  doc.at_css("p.lead").text # => "Hello"
56
56
 
@@ -184,6 +184,27 @@ and unusually large documents can raise it with `max_bytes:`.
184
184
  Makiri::XML(huge_xml, max_bytes: 512 * 1024 * 1024) # also Makiri::XML::Document.parse(..., max_bytes:)
185
185
  ```
186
186
 
187
+ ### Node identity
188
+
189
+ Navigating to the same node always gives the same Ruby object, for as long as
190
+ its document is alive. The document keeps every wrapper it has handed out, so
191
+ instance variables, singleton methods and `freeze` set on a node survive
192
+ garbage collection and are there the next time the node is reached.
193
+
194
+ That makes a node a safe place to keep per-node state, such as a wrapper
195
+ object of your own:
196
+
197
+ ```ruby
198
+ el = doc.at_css("p")
199
+ el.instance_variable_set(:@wrapper, MyElement.new(el))
200
+ doc.at_css("p").instance_variable_get(:@wrapper) # => the same MyElement
201
+ ```
202
+
203
+ A node created by `clone_node` or `import_node` is a new node with no state.
204
+ `pointer_id` is unique only among live nodes: once a document is freed, a node
205
+ of another document may reuse its value. So key a pointer-based cache per
206
+ document, not across documents.
207
+
187
208
  ## Non-goals (v1.0)
188
209
 
189
210
  * XSLT, DTD / Schema / RelaxNG validation, XPointer, XInclude.
@@ -224,6 +245,7 @@ See also [`spec/conformance/README.md`](spec/conformance/README.md).
224
245
  | XPath 1.0 | XML | `Nokogiri::XML` — differential | `conformance:xpath_xml` |
225
246
  | Parsed tree (property-based) | XML | `Nokogiri::XML` — differential | `conformance:xml_pbt` |
226
247
  | CSS selectors | XML | `Nokogiri::XML` — differential | `conformance:css_xml` |
248
+ | XML Builder | Ruby DSL | `Nokogiri::XML::Builder` — differential | `conformance:builder` |
227
249
 
228
250
  ## Requirements
229
251
 
Binary file
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Makiri
4
- VERSION = "0.12.1"
4
+ VERSION = "0.13.0"
5
5
  end
@@ -55,9 +55,9 @@ UNSAFE_ISLANDS = {
55
55
  "lexbor/abi.rs" => 4,
56
56
  "lexbor/adapter/arena_bytes.rs" => 14,
57
57
  "lexbor/adapter/cross_import.rs" => 2,
58
- "lexbor/adapter/html/attrs.rs" => 20,
59
- "lexbor/adapter/html/build.rs" => 24,
60
- "lexbor/adapter/html/mod.rs" => 62,
58
+ "lexbor/adapter/html/attrs.rs" => 23,
59
+ "lexbor/adapter/html/build.rs" => 25,
60
+ "lexbor/adapter/html/mod.rs" => 63,
61
61
  "lexbor/adapter/html/mutate.rs" => 9,
62
62
  "lexbor/adapter/html/serialize.rs" => 18,
63
63
  "lexbor/adapter/post_parse.rs" => 13,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makiri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.13.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - takahashim