@redpanda-data/docs-extensions-and-macros 4.16.3 → 4.16.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redpanda-data/docs-extensions-and-macros",
3
- "version": "4.16.3",
3
+ "version": "4.16.4",
4
4
  "description": "Antora extensions and macros developed for Redpanda documentation.",
5
5
  "keywords": [
6
6
  "antora",
@@ -9,13 +9,15 @@ function bloblangExample(example) {
9
9
  let summary = example.summary.trim();
10
10
 
11
11
  // Convert Markdown headings to AsciiDoc
12
+ // Cap at H2 level to avoid creating multiple document titles (H1)
12
13
  // ##### Heading -> === Heading (H5 -> H3 in AsciiDoc)
13
14
  // H3 fits correctly under the H2 "Examples" section
14
15
  summary = summary.replace(/^#####\s+(.+)$/gm, '=== $1');
15
16
  // #### Heading -> == Heading (H4 -> H2 in AsciiDoc)
16
17
  summary = summary.replace(/^####\s+(.+)$/gm, '== $1');
17
- // ### Heading -> = Heading (H3 -> H1 in AsciiDoc)
18
- summary = summary.replace(/^###\s+(.+)$/gm, '= $1');
18
+ // ### Heading -> == Heading (H3 -> H2 in AsciiDoc)
19
+ // Capped at H2 to prevent invalid second document title if H3 appears in summaries
20
+ summary = summary.replace(/^###\s+(.+)$/gm, '== $1');
19
21
 
20
22
  // Ensure lead-in ends with a colon (replace period/exclamation/question mark if present)
21
23
  if (summary.endsWith('.') || summary.endsWith('!') || summary.endsWith('?')) {