glossarist 2.10.1 → 2.10.3
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: fb1aa6f911f51d2a58777a0b48615d94bdf84f46cf434f7850ffbd022b8ad0ff
|
|
4
|
+
data.tar.gz: 9129cf0ef1e397c530795c33d702de64836f6728aa3825e5e255e3c64fb6dfa0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9c6fccba7097d7572c7715f499e8be577557fd936fd3f7bc6573427a1e498eb859533a1506a3c19e28196d3ba85381509fde73d9d0fb67a9d89f65bd24acb6e
|
|
7
|
+
data.tar.gz: 7f42bfe0f602950647f08521a2e084480497d57e0d94e9b62cbfb07bd65a4fc7e9eda51a4f0640b5d37360d6f71db0d360160a0558cf3bf469092aceed4e1689
|
|
@@ -15,7 +15,7 @@ module Glossarist
|
|
|
15
15
|
|
|
16
16
|
def check(context)
|
|
17
17
|
extractor = ReferenceExtractor.new
|
|
18
|
-
|
|
18
|
+
referenced_basenames = Set.new
|
|
19
19
|
|
|
20
20
|
context.concepts.each do |concept|
|
|
21
21
|
concept.localizations.each do |l10n|
|
|
@@ -23,19 +23,21 @@ module Glossarist
|
|
|
23
23
|
next unless text
|
|
24
24
|
|
|
25
25
|
extractor.extract_from_text(text).each do |ref|
|
|
26
|
-
|
|
26
|
+
if ref.is_a?(AssetReference)
|
|
27
|
+
referenced_basenames.add(File.basename(ref.path))
|
|
28
|
+
end
|
|
27
29
|
end
|
|
28
30
|
end
|
|
29
31
|
end
|
|
30
32
|
|
|
31
33
|
extractor.extract_asset_refs_from_concept(concept).each do |ref|
|
|
32
|
-
|
|
34
|
+
referenced_basenames.add(File.basename(ref.path))
|
|
33
35
|
end
|
|
34
36
|
end
|
|
35
37
|
|
|
36
38
|
issues = []
|
|
37
39
|
context.asset_index.each_path do |path|
|
|
38
|
-
next if
|
|
40
|
+
next if referenced_basenames.include?(File.basename(path))
|
|
39
41
|
|
|
40
42
|
issues << issue(
|
|
41
43
|
"Orphaned image: #{path} (not referenced by any concept)",
|
data/lib/glossarist/version.rb
CHANGED