asciidoctor-rhrev 1.2.1 → 1.2.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: 276f637c4b79aea05fbe85e5e1d094c589c6db123bd6e122550cb1c05c905665
4
- data.tar.gz: 58d31c0cb4c0166751f8e4468869412fcbebfa77b97a7437ef18496a41a34965
3
+ metadata.gz: 87f9419e740ba6f0002e1a4fd06c2930319910ff2a3bf2fbeeefbfee33d6c0d3
4
+ data.tar.gz: 2c6759b77bd7c9ab7d16e906a569541c36a185a594f45b0e398e2f028087e0bc
5
5
  SHA512:
6
- metadata.gz: 8dd9503efa38605fef59b798d0013770e77c6770711305e56131dcc7bd46c835d969a708c2104f8e0141d41a5cab47218697f7433d9d14eeff0281ea3dc2a44f
7
- data.tar.gz: 9c2c1967469f0f6330d7cf3c220cec2c701b7030fb849ee7f7da0b1189aced01dd3ec6068df7542dd350b33b6be4a47eb890651ba899d69fc113820df94e0e5f
6
+ metadata.gz: d939d3d0be086e54ef94165c96532594992d45adf7d3f93cd1b1d64b2667db5bddfdfc6566252b7dc0b830536c46c2dc822c313d19477ec78c0e8dfbb816905a
7
+ data.tar.gz: 9918859a0819b3ad98926199f499eab62ff3185cd012f31b0c45fe5b8f76ae310c6fcdb9ab3096fa256335b2d5cdd42fb1f1a739e6cbba53e8db9da5c3fbb654
data/CHANGELOG.adoc CHANGED
@@ -1,5 +1,16 @@
1
1
  = Changelog
2
2
 
3
+ == 1.2.3 (2026-07-15)
4
+
5
+ * Fix the initial-release table (revnumber `1.0`/`1` with `rhrev-initial-handling` `initial-release`) rendering a "Major changes since Revision X" header row: an initial release has no prior revision, so the table is now a single `Page | Initial Release` row (PDF backend, HTML backend, and Antora extension). Caption, custom first row, and all localization/customization attributes are unaffected; `rhrev-localization-major-changes` still applies to the regular revision-history table
6
+
7
+ == 1.2.2 (2026-07-15)
8
+
9
+ * Fix the initial-release table (revnumber `1.0`/`1`) dropping the `rhrev-table-caption` and the custom first row (`rhrev-customization-first-row`, `-left`, `-right`) in the PDF backend; both now render the same way as in the regular revision-history table
10
+ * Fix the initial-release table dropping the custom first row in the HTML backend and the Antora extension (the caption already rendered there)
11
+ * Fix the HTML backend dropping the right cell (`rhrev-customization-first-row-right`) whenever the left cell was also set, in both the regular and initial-release tables
12
+ * Note: the npm package skips 1.2.1, which was a PDF-only fix; gem and npm versions are aligned again at 1.2.2
13
+
3
14
  == 1.2.1 (2026-07-07)
4
15
 
5
16
  * Fix PDF change bars bleeding from a marked section/chapter into its child sections/chapters: a section's bar now always stops at its own content, right before the first nested subsection, regardless of whether that subsection is itself marked
@@ -233,23 +233,16 @@ module Asciidoctor
233
233
 
234
234
  column_widths = get_column_widths doc
235
235
  table_data = []
236
-
236
+
237
237
  page_label = doc.attr 'rhrev-localization-page', 'Page'
238
- major_changes_text = doc.attr 'rhrev-localization-major-changes', 'Major changes since'
239
-
240
- revision_label = doc.attr('version-label', 'Revision')
241
- revnumber = doc.attr('revnumber')
242
-
243
- header_text = "*#{major_changes_text} #{revision_label} #{revnumber}*"
244
- table_data << ["*#{page_label}*", header_text]
245
-
246
238
  initial_text = doc.attr 'rhrev-customization-initial-release-text', 'Initial Release'
247
- table_data << ["", initial_text]
239
+ table_data << ["*#{page_label}*", initial_text]
248
240
 
249
241
  formatted_widths = column_widths.map { |w| w.to_i.to_s }.join(',')
250
242
  markup_lines = []
251
243
  markup_lines << "[cols='#{formatted_widths}']"
252
244
  markup_lines << "|==="
245
+ add_custom_first_row_to_markup markup_lines, doc
253
246
  table_data.each do |row|
254
247
  markup_lines << "|#{row[0]} |#{row[1]}"
255
248
  end
@@ -263,7 +256,11 @@ module Asciidoctor
263
256
  if (stripes = doc.attr 'rhrev-table-stripes')
264
257
  table.set_attr 'stripes', stripes
265
258
  end
266
-
259
+
260
+ if !(doc.attr? 'rhrev-disable-caption') && (caption = doc.attr 'rhrev-table-caption')
261
+ table.title = caption
262
+ end
263
+
267
264
  convert_table table
268
265
  end
269
266
 
@@ -114,10 +114,7 @@ module Asciidoctor
114
114
 
115
115
  column_widths = doc.attr('rhrev-table-column-width', '30,70').split(',').map(&:strip)
116
116
  section_label = doc.attr('rhrev-localization-location', 'Section')
117
- major_changes_text = doc.attr('rhrev-localization-major-changes', 'Major changes since')
118
- version_label = doc.attr('version-label', 'Revision')
119
- revnumber = doc.attr('revnumber', '1.0')
120
-
117
+
121
118
  # Build table CSS classes with frame and grid
122
119
  frame = doc.attr('rhrev-table-frame', 'all')
123
120
  grid = doc.attr('rhrev-table-grid', 'all')
@@ -134,13 +131,26 @@ module Asciidoctor
134
131
  column_widths.each { |w| html << %(<col style="width: #{w}%;">)}
135
132
  html << '</colgroup>'
136
133
  html << '<tbody>'
137
- html << '<tr class="rhrev-header">'
138
- html << %(<th class="tableblock halign-left valign-top">#{section_label}</th>)
139
- html << %(<th class="tableblock halign-left valign-top"><strong>#{major_changes_text} #{version_label} #{revnumber}</strong></th>)
140
- html << '</tr>'
134
+
135
+ # Custom first row
136
+ if (first_row = doc.attr('rhrev-customization-first-row'))
137
+ html << '<tr class="rhrev-custom-first-row">'
138
+ html << %(<td colspan="2">#{first_row}</td>)
139
+ html << '</tr>'
140
+ else
141
+ first_row_left = doc.attr('rhrev-customization-first-row-left')
142
+ first_row_right = doc.attr('rhrev-customization-first-row-right')
143
+ if first_row_left || first_row_right
144
+ html << '<tr class="rhrev-custom-first-row">'
145
+ html << %(<td>#{first_row_left || '&nbsp;'}</td>)
146
+ html << %(<td>#{first_row_right || '&nbsp;'}</td>)
147
+ html << '</tr>'
148
+ end
149
+ end
150
+
141
151
  html << '<tr>'
142
- html << '<td>&nbsp;</td>'
143
- html << %(<td>#{initial_text}</td>)
152
+ html << %(<th class="tableblock halign-left valign-top">#{section_label}</th>)
153
+ html << %(<td class="tableblock halign-left valign-top">#{initial_text}</td>)
144
154
  html << '</tr>'
145
155
  html << '</tbody>'
146
156
  html << '</table>'
@@ -228,12 +238,15 @@ module Asciidoctor
228
238
  html << '<tr class="rhrev-custom-first-row">'
229
239
  html << %(<td colspan="2">#{first_row}</td>)
230
240
  html << '</tr>'
231
- elsif (first_row_left = doc.attr('rhrev-customization-first-row-left')) ||
232
- (first_row_right = doc.attr('rhrev-customization-first-row-right'))
233
- html << '<tr class="rhrev-custom-first-row">'
234
- html << %(<td>#{first_row_left || '&nbsp;'}</td>)
235
- html << %(<td>#{first_row_right || '&nbsp;'}</td>)
236
- html << '</tr>'
241
+ else
242
+ first_row_left = doc.attr('rhrev-customization-first-row-left')
243
+ first_row_right = doc.attr('rhrev-customization-first-row-right')
244
+ if first_row_left || first_row_right
245
+ html << '<tr class="rhrev-custom-first-row">'
246
+ html << %(<td>#{first_row_left || '&nbsp;'}</td>)
247
+ html << %(<td>#{first_row_right || '&nbsp;'}</td>)
248
+ html << '</tr>'
249
+ end
237
250
  end
238
251
 
239
252
  section_label = doc.attr 'rhrev-localization-location', 'Section'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-rhrev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 白一百 baiyibai