asciidoctor-rhrev 1.2.0 → 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.
@@ -210,10 +210,7 @@ function generateInitialReleaseHtml(doc) {
210
210
 
211
211
  const columnWidths = String(doc.getAttribute('rhrev-table-column-width') || '30,70').split(',').map(w => w.trim())
212
212
  const sectionLabel = doc.getAttribute('rhrev-localization-location') || 'Section'
213
- const majorChangesText = doc.getAttribute('rhrev-localization-major-changes') || 'Major changes since'
214
- const versionLabel = doc.getAttribute('version-label') || 'Revision'
215
- const revnumber = doc.getAttribute('revnumber') || '1.0'
216
-
213
+
217
214
  // Build table with frame/grid classes
218
215
  const frame = doc.getAttribute('rhrev-table-frame') || 'all'
219
216
  const grid = doc.getAttribute('rhrev-table-grid') || 'all'
@@ -233,13 +230,26 @@ function generateInitialReleaseHtml(doc) {
233
230
  })
234
231
  html.push('</colgroup>')
235
232
  html.push('<tbody>')
236
- html.push('<tr class="rhrev-header">')
237
- html.push(`<th class="tableblock halign-left valign-top">${sectionLabel}</th>`)
238
- html.push(`<th class="tableblock halign-left valign-top"><strong>${majorChangesText} ${versionLabel} ${revnumber}</strong></th>`)
239
- html.push('</tr>')
233
+
234
+ // Custom first row
235
+ const firstRow = doc.getAttribute('rhrev-customization-first-row')
236
+ const firstRowLeft = doc.getAttribute('rhrev-customization-first-row-left')
237
+ const firstRowRight = doc.getAttribute('rhrev-customization-first-row-right')
238
+
239
+ if (firstRow) {
240
+ html.push('<tr class="rhrev-custom-first-row">')
241
+ html.push(`<td colspan="2">${firstRow}</td>`)
242
+ html.push('</tr>')
243
+ } else if (firstRowLeft || firstRowRight) {
244
+ html.push('<tr class="rhrev-custom-first-row">')
245
+ html.push(`<td>${firstRowLeft || '&nbsp;'}</td>`)
246
+ html.push(`<td>${firstRowRight || '&nbsp;'}</td>`)
247
+ html.push('</tr>')
248
+ }
249
+
240
250
  html.push('<tr>')
241
- html.push('<td>&nbsp;</td>')
242
- html.push(`<td>${initialText}</td>`)
251
+ html.push(`<th class="tableblock halign-left valign-top">${sectionLabel}</th>`)
252
+ html.push(`<td class="tableblock halign-left valign-top">${initialText}</td>`)
243
253
  html.push('</tr>')
244
254
  html.push('</tbody>')
245
255
  html.push('</table>')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asciidoctor-rhrev",
3
- "version": "1.2.0",
3
+ "version": "1.2.3",
4
4
  "description": "Revision history block macro extension for Asciidoctor.js and Antora (HTML5 backend)",
5
5
  "main": "antora-extension/antora-rhrev-asciidoc.js",
6
6
  "scripts": {