metanorma-plugin-glossarist 0.5.0 → 0.5.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ee23c99402fe5be916f845b08d2c696205b744f2ed76f7683c8672e404f08d9
|
|
4
|
+
data.tar.gz: 58cc33d1bbec6df215439a64b249c9cad03beebef66914878b08af3c07b63440
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 783599cbb047e82b8c628305ad5ba6ac8325f0ba14c67e01637496f8b25935d9e7b0e3cdca869e34d0fe1407e74ac0c5accf8b7f163b55f48ead5d11dfb54ce4
|
|
7
|
+
data.tar.gz: 6724a7327a8048ac1080a2f059431cd2d4b692905db63b17dba79eaad45a8a5b234e31eb762ad27d143f526bc857d6808400e3d1dd91e887eb4dd22d0f1ac0a7
|
|
@@ -6,10 +6,11 @@ module Metanorma
|
|
|
6
6
|
# Extracts bibliography-citable mention IDs from concept text using
|
|
7
7
|
# +Glossarist::ReferenceExtractor+ as the single canonical parser.
|
|
8
8
|
#
|
|
9
|
-
# Bibliography relevance = +BibliographicReference+ (from
|
|
10
|
-
#
|
|
11
|
-
# +{{cite:id}}+ mentions). Other mention kinds
|
|
12
|
-
# reference assets or concepts, not
|
|
9
|
+
# Bibliography relevance = +BibliographicReference+ (from +{{bib:id}}+
|
|
10
|
+
# mentions) and +ConceptReference+ instances whose +#cite?+ is true
|
|
11
|
+
# (from +{{cite:id}}+ mentions). Other mention kinds
|
|
12
|
+
# (fig/table/formula/urn) reference assets or concepts, not
|
|
13
|
+
# bibliography entries.
|
|
13
14
|
class MentionExtractor
|
|
14
15
|
def initialize(text)
|
|
15
16
|
@text = text
|
|
@@ -78,7 +78,8 @@ module Metanorma
|
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
def find_parent_id(concept)
|
|
81
|
-
concept.data.related
|
|
81
|
+
related = concept.data.related || concept.related
|
|
82
|
+
related&.find { |r| r.type == "broader" }&.ref&.id&.to_s
|
|
82
83
|
end
|
|
83
84
|
|
|
84
85
|
def build_anchor(id, prefix)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-plugin-glossarist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
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-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|
|
@@ -82,7 +82,6 @@ files:
|
|
|
82
82
|
- ".github/workflows/rake.yml"
|
|
83
83
|
- ".github/workflows/release.yml"
|
|
84
84
|
- ".gitignore"
|
|
85
|
-
- ".hound.yml"
|
|
86
85
|
- ".rspec"
|
|
87
86
|
- ".rubocop.yml"
|
|
88
87
|
- ".rubocop_todo.yml"
|