From 0816dced718302db3b7b930c10084257854b58aa Mon Sep 17 00:00:00 2001 From: David Gregorczyk <54440227+d-gregorczyk@users.noreply.github.com> Date: Mon, 10 Apr 2023 15:27:20 +0200 Subject: [PATCH] 134/136 numbering of table in annex appears to be wrong / defective figure rendering (#137) * #136 Fix path to XML file. * #134 Fix numbering offset error. * Change merge strategy for changelog file to "union" * #134 #136 Add changelog entries. * #134 Change changelog text. * #136 Change changelog text --- .../org/sdpi/asciidoc/extension/NumberingProcessor.kt | 9 +++++---- .gitattributes | 1 + CHANGELOG.md | 3 +++ asciidoc/volume3/tf3-ch-8.7.3-physiologic-monitor.adoc | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .gitattributes diff --git a/.ci/asciidoc-converter/src/main/kotlin/org/sdpi/asciidoc/extension/NumberingProcessor.kt b/.ci/asciidoc-converter/src/main/kotlin/org/sdpi/asciidoc/extension/NumberingProcessor.kt index d143f65..51f766a 100644 --- a/.ci/asciidoc-converter/src/main/kotlin/org/sdpi/asciidoc/extension/NumberingProcessor.kt +++ b/.ci/asciidoc-converter/src/main/kotlin/org/sdpi/asciidoc/extension/NumberingProcessor.kt @@ -228,7 +228,7 @@ class NumberingProcessor( } else -> if (section.isAppendix()) { - currentAppendix = sdpiOffset.first() + currentAppendix = sdpiOffset.first() - 1 } else { numbering[level] = sdpiOffset.toInt().let { numbering[level].copy(offset = it) @@ -307,11 +307,12 @@ class NumberingProcessor( numbering[level] = numbering[level].copy( title = section.title, appendix = if (section.isAppendix()) { - validate(currentAppendix <= 'Z', section) { + val appendixChar = ++currentAppendix + validate(appendixChar <= 'Z', section) { "Maximum number of appendices exceeded (26, A to Z)." } - section.caption = "$appendixCaption${volumePrefix()}$currentAppendix " - (currentAppendix++).toString() + section.caption = "$appendixCaption${volumePrefix()}$appendixChar " + appendixChar.toString() } else { null } diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4157440 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +CHANGELOG.md merge=union \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e878649..6481cf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,4 +20,7 @@ Each section shall contain a list of action items of the following format: `