pubid 2.0.0.pre.alpha.56 → 2.0.0.pre.alpha.57
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/lib/pubid/renderers/supplement_renderer.rb +7 -3
- data/lib/pubid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70979465840486106762bb8f458350afc40c642b0511505514a595e78bdb8ab5
|
|
4
|
+
data.tar.gz: e9ee0e755aa917dabbf8fa006e581d3a9bad351a743833f9d4ebe6fecd04465d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0eb981cb03629a763f0607d11e38a55fc30cf8662081a9fdd3a5e5b9defc56fa55b7598b589c16d5a4a7eaafabd5c74210c8e65433ed9a919302a661241d7456
|
|
7
|
+
data.tar.gz: 551760209ddb0c5816ee9e463fc058144e50822d41fdf2e94d8f7c7cdb136515416a1c1be02be4b1109a1da8e640a270842e6d915162d3bdc4eeea44ab83d553
|
|
@@ -13,14 +13,18 @@ module Pubid
|
|
|
13
13
|
annotated: context.annotated,
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
# A nil typed_stage means "no stage" (metanorma-iso's draft-biblio
|
|
17
|
+
# flow assigns nil through the public setter); render the supplement
|
|
18
|
+
# without the stage segment instead of crashing on nil.render.
|
|
19
|
+
stage_str = @id.typed_stage &&
|
|
20
|
+
annotate(@id.typed_stage.render(context:),
|
|
17
21
|
typed_stage_css(@id.typed_stage),
|
|
18
22
|
annotated: context.annotated)
|
|
19
|
-
parts << "#{base_str}/#{stage_str}"
|
|
23
|
+
parts << (stage_str ? "#{base_str}/#{stage_str}" : "#{base_str}/")
|
|
20
24
|
|
|
21
25
|
num_port = render_number_portion(context)
|
|
22
26
|
if num_port && !num_port.empty? && !num_port.start_with?(":")
|
|
23
|
-
parts << (stage_str
|
|
27
|
+
parts << (stage_str&.end_with?(".") ? "" : " ")
|
|
24
28
|
end
|
|
25
29
|
parts << num_port
|
|
26
30
|
|
data/lib/pubid/version.rb
CHANGED