asciidoctor-rhrev 1.9.0 → 1.9.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 +4 -4
- data/CHANGELOG.adoc +4 -0
- data/lib/asciidoctor/rhrev/converter.rb +1 -0
- data/lib/asciidoctor/rhrev/rhrev_html.rb +1 -0
- data/lib/asciidoctor/rhrev/third_level.rb +12 -0
- 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: 1690ca9ed25a8e0966569d299372ac2bbb40366fbc71e76f2adb9cbba2ea2c54
|
|
4
|
+
data.tar.gz: d1d8305f5b8a1adeb9e5350ef8703dd8bb93afe186efed5c5059fc77e3de5c8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 673e1e9aec49e0d00da366979aa2ce53835aae25c1150298ed68aa8d7d5d95246cb95419584c9ad1aa456a38227f6e02fb4380781739616f08ee5035ea138ff8
|
|
7
|
+
data.tar.gz: 1cff0cb3ae7974cf4eefa0d30b65a014877755c7737c9661ddff318d5fc2968fb9f69d3261a4c4fbd6de994aa87924946af21d27b5dbfc960896c144a867e014
|
data/CHANGELOG.adoc
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
= Changelog
|
|
2
2
|
|
|
3
|
+
== 1.9.1 (2026-10-27)
|
|
4
|
+
|
|
5
|
+
* Fix an rhrev attribute with an empty change text, such as `[rhrev1-3=""]`, drawing a change bar and adding a stray `*` bullet to its enclosing row. The extension now skips an empty mark, `-all`, or `-cover` attribute as if absent: no change bar, no entry. `ThirdLevel.drop_empty_marks` runs before the mixed-release check in the PDF and HTML backends, `dropEmptyMarks` in both Antora extension files, and the Antora cell-text lift adds no `rhrev-changed` span for an empty mark. New regression files `tests/regression/empty-change-text.rb` and `tests/regression/js-empty-change-text.js` (gem and npm)
|
|
6
|
+
|
|
3
7
|
== 1.9.0 (2026-10-27)
|
|
4
8
|
|
|
5
9
|
* Third-level revisions such as `1.3.2`. The `rhrev-third-level` attribute selects `collapse` or `expand`, and `rhrev-third-level-kind` selects `draft`, the default, or `amendment`. With either mode, every mark of the current `x.y` release up to the current third level draws a change bar. `collapse` groups the revision history table by `x.y`, merging change texts and `all` and `cover` entries, with the group header reading `x-y-prevrev` and falling back to the lowest third-level `prevrev`. `expand` keeps one group per revision. `draft` orders `x.y` after its drafts, and a bare `x.y` mark beside its own drafts logs a warning and is ignored everywhere, `all` and `cover` entries included; `amendment` orders `x.y` before its amendments. New `third_level.rb` and `antora-extension/third-level.js`; the Antora extensions parse every page first so a release ignored on one page is ignored on all. Unset, output is unchanged (gem and npm)
|
|
@@ -164,6 +164,7 @@ module Asciidoctor
|
|
|
164
164
|
# Lifting cell text marks first lets the mixed-release check see
|
|
165
165
|
# them; prescan_document lifts again, which finds nothing left.
|
|
166
166
|
::Asciidoctor::Rhrev::CellTextMarks.lift node, @revision_prefix
|
|
167
|
+
::Asciidoctor::Rhrev::ThirdLevel.drop_empty_marks node, @revision_prefix
|
|
167
168
|
::Asciidoctor::Rhrev::ThirdLevel.drop_mixed_release_marks node, @revision_prefix
|
|
168
169
|
init_change_bars node
|
|
169
170
|
|
|
@@ -42,6 +42,7 @@ module Asciidoctor
|
|
|
42
42
|
prefix = document.attr 'revhistoryprefix', 'rhrev'
|
|
43
43
|
|
|
44
44
|
::Asciidoctor::Rhrev::CellTextMarks.lift document, prefix
|
|
45
|
+
::Asciidoctor::Rhrev::ThirdLevel.drop_empty_marks document, prefix
|
|
45
46
|
::Asciidoctor::Rhrev::ThirdLevel.drop_mixed_release_marks document, prefix
|
|
46
47
|
|
|
47
48
|
document.find_by(context: :table).each do |table|
|
|
@@ -96,6 +96,18 @@ module Asciidoctor
|
|
|
96
96
|
revision_of key.to_s.sub(/-(?:all|cover)\z/, ''), prefix
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
+
# Removes every mark, -all, and -cover entry with an empty value, so
|
|
100
|
+
# an empty mark draws no change bar and adds no entry anywhere. Runs
|
|
101
|
+
# once per document, after CellTextMarks.lift and before
|
|
102
|
+
# drop_mixed_release_marks.
|
|
103
|
+
def self.drop_empty_marks doc, prefix
|
|
104
|
+
return if doc.instance_variable_get :@rhrev_empty_marks_dropped
|
|
105
|
+
doc.instance_variable_set :@rhrev_empty_marks_dropped, true
|
|
106
|
+
each_marked_attributes(doc) do |attributes|
|
|
107
|
+
attributes.delete_if {|key, value| (marked_revision_of key, prefix) && value.to_s.strip.empty? }
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
99
111
|
# In a draft-kind document, removes every mark, -all, and -cover
|
|
100
112
|
# entry of an x-y release that the document also marks drafts of,
|
|
101
113
|
# warning once per release, so no backend shows a release beside its
|