metanorma-plugin-glossarist 0.5.0 → 0.5.2
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: db0124df506956c04fd99381c614e2d921ead65cf5918a1bb8f49b80cde8c2c9
|
|
4
|
+
data.tar.gz: e60bf164cd7becbc5a096a774d5d8f6b494478e6cf1558f6b9c6ca2703a5025a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc7a8c4118818585c2c80b818cb4679be59123a2b8474318d37f9026769b110c0c5b466d78db01ff114d0d45f9e7bf70a5c017af9fe4f0c3a167e8cc199ebfd1
|
|
7
|
+
data.tar.gz: 8bad06b56f2d363acbf96a85c4dac4ec8a23c31bc12ead57ee3887acb8e4f146ecf7a18b97c2c12bd8bdb13aa52a6db8d4450738ece556e5e8723549329b3908
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
1
|
+
# Formerly cimas-managed. Now consumer-owned per metanorma/cimas#68
|
|
2
|
+
# (workflow-file conversion from cimas-synced copied stubs to reusable-workflow
|
|
3
|
+
# references). Pins metanorma/ci reusable at @v1 (moving major, three-tier
|
|
4
|
+
# tagging discipline per metanorma/ci#372).
|
|
3
5
|
name: rake
|
|
4
6
|
|
|
5
7
|
on:
|
|
@@ -13,6 +15,6 @@ permissions:
|
|
|
13
15
|
|
|
14
16
|
jobs:
|
|
15
17
|
rake:
|
|
16
|
-
uses: metanorma/ci/.github/workflows/generic-rake.yml@
|
|
18
|
+
uses: metanorma/ci/.github/workflows/generic-rake.yml@v1
|
|
17
19
|
secrets:
|
|
18
20
|
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
data/Gemfile
CHANGED
|
@@ -12,11 +12,14 @@ gem "rubocop-rspec"
|
|
|
12
12
|
|
|
13
13
|
gemspec
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
# spec_helper renders through the metanorma :standoc backend
|
|
16
|
+
# (Asciidoctor.convert with backend: :standoc), which only
|
|
17
|
+
# metanorma-standoc registers — a test-time need. The released gem
|
|
18
|
+
# requires none of it: lib/ needs asciidoctor, glossarist, liquid and
|
|
19
|
+
# metanorma-utils. The release workflow bundles with `without 'test'`,
|
|
20
|
+
# which excludes exactly this group, and `bundle exec rake release`
|
|
21
|
+
# keeps working because the Rakefile loads only bundler/gem_tasks
|
|
22
|
+
# and rspec.
|
|
23
|
+
group :test do
|
|
24
|
+
gem "metanorma-standoc"
|
|
25
|
+
end
|
|
@@ -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.2
|
|
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-29 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"
|