asciidoctor-rhrev 1.2.1 → 1.2.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: 276f637c4b79aea05fbe85e5e1d094c589c6db123bd6e122550cb1c05c905665
4
- data.tar.gz: 58d31c0cb4c0166751f8e4468869412fcbebfa77b97a7437ef18496a41a34965
3
+ metadata.gz: 4d83e91d276df02dd54e4b4af8c2ca5524ec503c36603e0e5f268309e5f0d529
4
+ data.tar.gz: 7780816da60b8799b7c4e9427fa7436c086862b0b8dde350e5a681f76f4ee017
5
5
  SHA512:
6
- metadata.gz: 8dd9503efa38605fef59b798d0013770e77c6770711305e56131dcc7bd46c835d969a708c2104f8e0141d41a5cab47218697f7433d9d14eeff0281ea3dc2a44f
7
- data.tar.gz: 9c2c1967469f0f6330d7cf3c220cec2c701b7030fb849ee7f7da0b1189aced01dd3ec6068df7542dd350b33b6be4a47eb890651ba899d69fc113820df94e0e5f
6
+ metadata.gz: a232c651f5391d90456fe32ada20a1f072044b74bc7998339197662015091fc2781ea053599911abb74fc56384ed63a86c77016562198ae25751282a5c9abfb4
7
+ data.tar.gz: 20cdc734fb0840b3846ff3f01add4d1442c957ce84add7057920b14cb1e456816fd5a20ad870fc77228fe63d3276233455a70dd3f7f1d15a6649be5a65ddff30
data/CHANGELOG.adoc CHANGED
@@ -1,5 +1,12 @@
1
1
  = Changelog
2
2
 
3
+ == 1.2.2 (2026-07-15)
4
+
5
+ * 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
6
+ * Fix the initial-release table dropping the custom first row in the HTML backend and the Antora extension (the caption already rendered there)
7
+ * 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
8
+ * 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
9
+
3
10
  == 1.2.1 (2026-07-07)
4
11
 
5
12
  * 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
@@ -250,6 +250,7 @@ module Asciidoctor
250
250
  markup_lines = []
251
251
  markup_lines << "[cols='#{formatted_widths}']"
252
252
  markup_lines << "|==="
253
+ add_custom_first_row_to_markup markup_lines, doc
253
254
  table_data.each do |row|
254
255
  markup_lines << "|#{row[0]} |#{row[1]}"
255
256
  end
@@ -263,7 +264,11 @@ module Asciidoctor
263
264
  if (stripes = doc.attr 'rhrev-table-stripes')
264
265
  table.set_attr 'stripes', stripes
265
266
  end
266
-
267
+
268
+ if !(doc.attr? 'rhrev-disable-caption') && (caption = doc.attr 'rhrev-table-caption')
269
+ table.title = caption
270
+ end
271
+
267
272
  convert_table table
268
273
  end
269
274
 
@@ -134,6 +134,23 @@ module Asciidoctor
134
134
  column_widths.each { |w| html << %(<col style="width: #{w}%;">)}
135
135
  html << '</colgroup>'
136
136
  html << '<tbody>'
137
+
138
+ # Custom first row
139
+ if (first_row = doc.attr('rhrev-customization-first-row'))
140
+ html << '<tr class="rhrev-custom-first-row">'
141
+ html << %(<td colspan="2">#{first_row}</td>)
142
+ html << '</tr>'
143
+ else
144
+ first_row_left = doc.attr('rhrev-customization-first-row-left')
145
+ first_row_right = doc.attr('rhrev-customization-first-row-right')
146
+ if first_row_left || first_row_right
147
+ html << '<tr class="rhrev-custom-first-row">'
148
+ html << %(<td>#{first_row_left || '&nbsp;'}</td>)
149
+ html << %(<td>#{first_row_right || '&nbsp;'}</td>)
150
+ html << '</tr>'
151
+ end
152
+ end
153
+
137
154
  html << '<tr class="rhrev-header">'
138
155
  html << %(<th class="tableblock halign-left valign-top">#{section_label}</th>)
139
156
  html << %(<th class="tableblock halign-left valign-top"><strong>#{major_changes_text} #{version_label} #{revnumber}</strong></th>)
@@ -228,12 +245,15 @@ module Asciidoctor
228
245
  html << '<tr class="rhrev-custom-first-row">'
229
246
  html << %(<td colspan="2">#{first_row}</td>)
230
247
  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>'
248
+ else
249
+ first_row_left = doc.attr('rhrev-customization-first-row-left')
250
+ first_row_right = doc.attr('rhrev-customization-first-row-right')
251
+ if first_row_left || first_row_right
252
+ html << '<tr class="rhrev-custom-first-row">'
253
+ html << %(<td>#{first_row_left || '&nbsp;'}</td>)
254
+ html << %(<td>#{first_row_right || '&nbsp;'}</td>)
255
+ html << '</tr>'
256
+ end
237
257
  end
238
258
 
239
259
  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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 白一百 baiyibai