metanorma-document 0.2.9 → 0.2.13
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 +4 -4
- data/CHANGELOG.md +1 -0
- data/Gemfile +8 -4
- data/lib/metanorma/document/version.rb +1 -1
- data/lib/metanorma/html.rb +3 -1
- data/lib/metanorma/standard_document/block_attributes.rb +18 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b70dbe97dadd0576e3ae226eb4e66ad7112b1e2876b9865ed070035d8d6a89e9
|
|
4
|
+
data.tar.gz: 2a843d047f3cbe4872e3416e7f66cf4d8077295f1016453f409056d6e3c93894
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 737da4c9acc3fcf9be5ea0a02673a9969f481cbad496174334f5ee6360679f0d331d8df7de5a33c9805fd71ba382f3d3a6c9c6137bc6501b9c0c5846d2da1535
|
|
7
|
+
data.tar.gz: 657aa49800f8112eb249b433f96d1408be47e7bc633b26b3e270991ecf22b71d372e5947b1eb6a8736b0206f542447a8e00f41476ca594683eede493035db1e5
|
data/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
### Fixed
|
|
15
15
|
|
|
16
|
+
- `Moxml::Adapter::Nokogiri.children` override accepts the `entity_bearing:` keyword of moxml 0.5.36 and later (#66)
|
|
16
17
|
- Roundtrip fidelity: missing attributes, model corrections, and Canon config alignment
|
|
17
18
|
- Stale `Semantic::Root` reference in rake task
|
|
18
19
|
|
data/Gemfile
CHANGED
|
@@ -5,11 +5,15 @@ source "https://rubygems.org"
|
|
|
5
5
|
# Specify your gem's dependencies in metanorma-standoc-document.gemspec
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
|
+
# The 0.2.x maintenance line serves the metanorma-cli 0.2.x bundle,
|
|
9
|
+
# whose relaton keeps rubyzip ~> 2.3 and therefore resolves
|
|
10
|
+
# lutaml-model below 0.8.31 (0.8.31+ needs rubyzip ~> 3.4). Released
|
|
11
|
+
# gems only: the upstream main branches move past this line.
|
|
8
12
|
if ENV["CI"]
|
|
9
|
-
gem "canon"
|
|
10
|
-
gem "lutaml-model",
|
|
11
|
-
gem "mml",
|
|
12
|
-
gem "moxml",
|
|
13
|
+
gem "canon"
|
|
14
|
+
gem "lutaml-model", "~> 0.8.0", "< 0.8.31"
|
|
15
|
+
gem "mml", "~> 2.4"
|
|
16
|
+
gem "moxml", "~> 0.5.0"
|
|
13
17
|
else
|
|
14
18
|
gem "canon", path: "../../lutaml/canon"
|
|
15
19
|
gem "lutaml-model", path: "../../lutaml/lutaml-model"
|
data/lib/metanorma/html.rb
CHANGED
|
@@ -18,7 +18,9 @@ module Metanorma
|
|
|
18
18
|
remove_method :children
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
# moxml 0.5.36+ passes `entity_bearing:`. The Nokogiri adapter
|
|
22
|
+
# does not use it, so accept it and ignore it.
|
|
23
|
+
def self.children(node, **)
|
|
22
24
|
node.children.to_a
|
|
23
25
|
end
|
|
24
26
|
end
|
|
@@ -54,12 +54,29 @@ module Metanorma
|
|
|
54
54
|
# Provides `blocks` method for ordered-content section types.
|
|
55
55
|
# Returns child nodes in document order via `each_mixed_content`.
|
|
56
56
|
module OrderedContent
|
|
57
|
+
# Section metadata mapped by SectionXmlMapping (title machinery
|
|
58
|
+
# and annotation markers) precedes the content alternation in
|
|
59
|
+
# the grammar — `blocks` answers content children only.
|
|
60
|
+
SECTION_METADATA_ELEMENTS = [
|
|
61
|
+
Metanorma::Document::Components::Inline::TitleWithAnnotationElement,
|
|
62
|
+
Metanorma::Document::Components::Inline::VariantTitleElement,
|
|
63
|
+
Metanorma::Document::Components::Inline::FmtTitleElement,
|
|
64
|
+
Metanorma::Document::Components::Inline::FmtXrefLabelElement,
|
|
65
|
+
Metanorma::Document::Components::Inline::FmtAnnotationStartElement,
|
|
66
|
+
Metanorma::Document::Components::Inline::FmtAnnotationEndElement,
|
|
67
|
+
].freeze
|
|
68
|
+
|
|
57
69
|
def blocks
|
|
58
70
|
@blocks ||=
|
|
59
71
|
begin
|
|
60
72
|
result = []
|
|
61
73
|
each_mixed_content do |node|
|
|
62
|
-
|
|
74
|
+
next if node.is_a?(String)
|
|
75
|
+
next if SECTION_METADATA_ELEMENTS.any? do |klass|
|
|
76
|
+
node.is_a?(klass)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
result << node
|
|
63
80
|
end
|
|
64
81
|
result
|
|
65
82
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-document
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|