From ecf89c3fe39e819c4c43a9ab0d501ff32e7820b7 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 19 Mar 2024 21:50:53 -0700 Subject: [PATCH] Polish asciidoc generated by changelog generator Refine the generator so that an additional space is included after section titles. --- .../configurationmetadata/changelog/ChangelogWriter.java | 8 ++++---- .../src/test/resources/sample.adoc | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata-changelog-generator/src/main/java/org/springframework/boot/configurationmetadata/changelog/ChangelogWriter.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata-changelog-generator/src/main/java/org/springframework/boot/configurationmetadata/changelog/ChangelogWriter.java index 92ffcfada21..a87c6bb47d8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata-changelog-generator/src/main/java/org/springframework/boot/configurationmetadata/changelog/ChangelogWriter.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata-changelog-generator/src/main/java/org/springframework/boot/configurationmetadata/changelog/ChangelogWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,11 +68,11 @@ class ChangelogWriter implements AutoCloseable { String newVersionNumber = changelog.newVersionNumber(); Map> differencesByType = collateByType(changelog); write("Configuration property changes between `%s` and `%s`%n", oldVersionNumber, newVersionNumber); - write("%n%n%n== Deprecated in %s%n", newVersionNumber); + write("%n%n%n== Deprecated in %s%n%n", newVersionNumber); writeDeprecated(differencesByType.get(DifferenceType.DEPRECATED)); - write("%n%n%n== Added in %s%n", newVersionNumber); + write("%n%n%n== Added in %s%n%n", newVersionNumber); writeAdded(differencesByType.get(DifferenceType.ADDED)); - write("%n%n%n== Removed in %s%n", newVersionNumber); + write("%n%n%n== Removed in %s%n%n", newVersionNumber); writeRemoved(differencesByType.get(DifferenceType.DELETED), differencesByType.get(DifferenceType.DEPRECATED)); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata-changelog-generator/src/test/resources/sample.adoc b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata-changelog-generator/src/test/resources/sample.adoc index ac5cc843e16..26876aa8542 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata-changelog-generator/src/test/resources/sample.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata-changelog-generator/src/test/resources/sample.adoc @@ -3,11 +3,13 @@ Configuration property changes between `1.0` and `2.0` == Deprecated in 2.0 + _None_. == Added in 2.0 + |====================== | Key | Default value | Description @@ -19,6 +21,7 @@ _None_. == Removed in 2.0 + |====================== | Key | Replacement | Reason