From 5b63b807adf95c05fa4c60ebf2354a26028d2f8b Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Sun, 7 Apr 2019 20:43:09 +0200 Subject: [PATCH] Separate compound properties in appendices --- .../CompoundConfigurationTableEntry.java | 9 ++++----- .../CompoundConfigurationTableEntryTests.java | 7 ++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntry.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntry.java index 1c58f2cc66..437a4922cd 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntry.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntry.java @@ -46,11 +46,10 @@ class CompoundConfigurationTableEntry extends ConfigurationTableEntry { @Override public void write(AsciidocBuilder builder) { - builder.append("|`+++"); - this.configurationKeys.forEach(builder::appendln); - builder.appendln("+++`"); - builder.appendln("|"); - builder.appendln("|+++", this.description, "+++"); + builder.append("|"); + this.configurationKeys.forEach((key) -> builder.appendln("`+", key, "+` +")); + builder.appendln("").appendln("|").append("|+++") + .append(this.description).appendln("+++"); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntryTests.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntryTests.java index 65a663630c..ac50091b53 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntryTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/CompoundConfigurationTableEntryTests.java @@ -47,9 +47,10 @@ public class CompoundConfigurationTableEntryTests { entry.addConfigurationKeys(firstProp, secondProp, thirdProp); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("|`+++spring.test.first" + NEWLINE - + "spring.test.second" + NEWLINE + "spring.test.third" + NEWLINE + "+++`" - + NEWLINE + "|" + NEWLINE + "|+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo( + "|`+spring.test.first+` +" + NEWLINE + "`+spring.test.second+` +" + + NEWLINE + "`+spring.test.third+` +" + NEWLINE + NEWLINE + "|" + + NEWLINE + "|+++This is a description.+++" + NEWLINE); } }