From 8a6e254465a7a11001ba0b3a6234b1a2cf9ee501 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Fri, 27 Sep 2019 11:28:27 +0200 Subject: [PATCH 1/2] Avoid need to escape pipe character in reference tables --- .../CompoundConfigurationTableEntry.java | 4 ++-- .../configurationdocs/ConfigurationTable.java | 4 ++-- .../SingleConfigurationTableEntry.java | 13 +++++----- .../CompoundConfigurationTableEntryTests.java | 4 ++-- .../ConfigurationTableTests.java | 8 +++---- .../SingleConfigurationTableEntryTests.java | 24 +++++++++---------- 6 files changed, 28 insertions(+), 29 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 603e902f5d..b8c81819f7 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 @@ -45,9 +45,9 @@ class CompoundConfigurationTableEntry extends ConfigurationTableEntry { @Override void write(AsciidocBuilder builder) { - builder.append("|"); + builder.append("¦"); this.configurationKeys.forEach(builder::appendKey); - builder.newLine().appendln("|").appendln("|+++", this.description, "+++"); + builder.newLine().appendln("¦").appendln("¦+++", this.description, "+++"); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/ConfigurationTable.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/ConfigurationTable.java index 83a36d9bb1..f7bc2edb18 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/ConfigurationTable.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/ConfigurationTable.java @@ -46,9 +46,9 @@ class ConfigurationTable { String toAsciidocTable() { AsciidocBuilder builder = new AsciidocBuilder(); - builder.appendln("[cols=\"1,1,2\", options=\"header\"]"); + builder.appendln("[cols=\"1,1,2\", separator=¦, options=\"header\"]"); builder.appendln("|==="); - builder.appendln("|Key|Default Value|Description"); + builder.appendln("¦Key¦Default Value¦Description"); builder.appendln(); this.entries.forEach((entry) -> { entry.write(builder); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntry.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntry.java index f1832a6944..bc5e62b572 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntry.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntry.java @@ -54,7 +54,7 @@ class SingleConfigurationTableEntry extends ConfigurationTableEntry { @Override void write(AsciidocBuilder builder) { - builder.appendln("|`+", this.key, "+`"); + builder.appendln("¦`+", this.key, "+`"); writeDefaultValue(builder); writeDescription(builder); builder.appendln(); @@ -62,22 +62,21 @@ class SingleConfigurationTableEntry extends ConfigurationTableEntry { private void writeDefaultValue(AsciidocBuilder builder) { String defaultValue = (this.defaultValue != null) ? this.defaultValue : ""; - defaultValue = defaultValue.replace("\\", "\\\\").replace("|", "{vbar}" + System.lineSeparator()); + defaultValue = defaultValue.replace("\\", "\\\\"); if (defaultValue.isEmpty()) { - builder.appendln("|"); + builder.appendln("¦"); } else { - builder.appendln("|`+", defaultValue, "+`"); + builder.appendln("¦`+", defaultValue, "+`"); } } private void writeDescription(AsciidocBuilder builder) { if (this.description == null || this.description.isEmpty()) { - builder.append("|"); + builder.append("¦"); } else { - String cleanedDescription = this.description.replace("|", "\\|"); - builder.append("|+++", cleanedDescription, "+++"); + builder.append("¦+++", this.description, "+++"); } } 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 0e06b59509..85a9c7c6e9 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 @@ -48,8 +48,8 @@ class CompoundConfigurationTableEntryTests { 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); + "¦`+spring.test.first+` +" + NEWLINE + "`+spring.test.second+` +" + NEWLINE + "`+spring.test.third+` +" + + NEWLINE + NEWLINE + "¦" + NEWLINE + "¦+++This is a description.+++" + NEWLINE); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/ConfigurationTableTests.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/ConfigurationTableTests.java index 2b15a47675..55b1d17881 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/ConfigurationTableTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/ConfigurationTableTests.java @@ -46,10 +46,10 @@ class ConfigurationTableTests { second.setType("java.lang.String"); table.addEntry(new SingleConfigurationTableEntry(first)); table.addEntry(new SingleConfigurationTableEntry(second)); - assertThat(table.toAsciidocTable()).isEqualTo("[cols=\"1,1,2\", options=\"header\"]" + NEWLINE + "|===" - + NEWLINE + "|Key|Default Value|Description" + NEWLINE + NEWLINE + "|`+spring.test.other+`" + NEWLINE - + "|`+other value+`" + NEWLINE + "|+++This is another description.+++" + NEWLINE + NEWLINE - + "|`+spring.test.prop+`" + NEWLINE + "|`+something+`" + NEWLINE + "|+++This is a description.+++" + assertThat(table.toAsciidocTable()).isEqualTo("[cols=\"1,1,2\", separator=¦, options=\"header\"]" + NEWLINE + + "|===" + NEWLINE + "¦Key¦Default Value¦Description" + NEWLINE + NEWLINE + "¦`+spring.test.other+`" + + NEWLINE + "¦`+other value+`" + NEWLINE + "¦+++This is another description.+++" + NEWLINE + NEWLINE + + "¦`+spring.test.prop+`" + NEWLINE + "¦`+something+`" + NEWLINE + "¦+++This is a description.+++" + NEWLINE + NEWLINE + "|===" + NEWLINE); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntryTests.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntryTests.java index 8da4cc76c7..642844cb6b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntryTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntryTests.java @@ -41,8 +41,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|`+something+`" + NEWLINE - + "|+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦`+something+`" + NEWLINE + + "¦+++This is a description.+++" + NEWLINE); } @Test @@ -55,7 +55,7 @@ class SingleConfigurationTableEntryTests { AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); assertThat(builder.toString()).isEqualTo( - "|`+spring.test.prop+`" + NEWLINE + "|" + NEWLINE + "|+++This is a description.+++" + NEWLINE); + "¦`+spring.test.prop+`" + NEWLINE + "¦" + NEWLINE + "¦+++This is a description.+++" + NEWLINE); } @Test @@ -68,8 +68,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|`+first{vbar}" + NEWLINE - + "second+`" + NEWLINE + "|+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦`+first|second+`" + NEWLINE + + "¦+++This is a description.+++" + NEWLINE); } @Test @@ -82,8 +82,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|`+first\\\\second+`" + NEWLINE - + "|+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦`+first\\\\second+`" + NEWLINE + + "¦+++This is a description.+++" + NEWLINE); } @Test @@ -95,8 +95,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|" + NEWLINE - + "|+++This is a description with a \\| pipe.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦" + NEWLINE + + "¦+++This is a description with a | pipe.+++" + NEWLINE); } @Test @@ -109,7 +109,7 @@ class SingleConfigurationTableEntryTests { AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); assertThat(builder.toString()).isEqualTo( - "|`+spring.test.prop.*+`" + NEWLINE + "|" + NEWLINE + "|+++This is a description.+++" + NEWLINE); + "¦`+spring.test.prop.*+`" + NEWLINE + "¦" + NEWLINE + "¦+++This is a description.+++" + NEWLINE); } @Test @@ -123,8 +123,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|`+first," + NEWLINE + "second," - + NEWLINE + "third+`" + NEWLINE + "|+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦`+first," + NEWLINE + "second," + + NEWLINE + "third+`" + NEWLINE + "¦+++This is a description.+++" + NEWLINE); } } From 370998e91e232b51ebe0bfa4ad0034abed7b7313 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Fri, 27 Sep 2019 17:52:40 +0200 Subject: [PATCH 2/2] Simplify pipe escaping for reference doc tables Replace `{vbar}` with an escaped pipe character. Unfortunately `{vbar}` does not render correctly with PDF generation. See gh-18374 --- .../CompoundConfigurationTableEntry.java | 4 ++-- .../configurationdocs/ConfigurationTable.java | 4 ++-- .../SingleConfigurationTableEntry.java | 13 +++++----- .../CompoundConfigurationTableEntryTests.java | 4 ++-- .../ConfigurationTableTests.java | 8 +++---- .../SingleConfigurationTableEntryTests.java | 24 +++++++++---------- 6 files changed, 29 insertions(+), 28 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 b8c81819f7..603e902f5d 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 @@ -45,9 +45,9 @@ class CompoundConfigurationTableEntry extends ConfigurationTableEntry { @Override void write(AsciidocBuilder builder) { - builder.append("¦"); + builder.append("|"); this.configurationKeys.forEach(builder::appendKey); - builder.newLine().appendln("¦").appendln("¦+++", this.description, "+++"); + builder.newLine().appendln("|").appendln("|+++", this.description, "+++"); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/ConfigurationTable.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/ConfigurationTable.java index f7bc2edb18..83a36d9bb1 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/ConfigurationTable.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/ConfigurationTable.java @@ -46,9 +46,9 @@ class ConfigurationTable { String toAsciidocTable() { AsciidocBuilder builder = new AsciidocBuilder(); - builder.appendln("[cols=\"1,1,2\", separator=¦, options=\"header\"]"); + builder.appendln("[cols=\"1,1,2\", options=\"header\"]"); builder.appendln("|==="); - builder.appendln("¦Key¦Default Value¦Description"); + builder.appendln("|Key|Default Value|Description"); builder.appendln(); this.entries.forEach((entry) -> { entry.write(builder); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntry.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntry.java index bc5e62b572..0ce1e7fbf7 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntry.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/main/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntry.java @@ -54,7 +54,7 @@ class SingleConfigurationTableEntry extends ConfigurationTableEntry { @Override void write(AsciidocBuilder builder) { - builder.appendln("¦`+", this.key, "+`"); + builder.appendln("|`+", this.key, "+`"); writeDefaultValue(builder); writeDescription(builder); builder.appendln(); @@ -62,21 +62,22 @@ class SingleConfigurationTableEntry extends ConfigurationTableEntry { private void writeDefaultValue(AsciidocBuilder builder) { String defaultValue = (this.defaultValue != null) ? this.defaultValue : ""; - defaultValue = defaultValue.replace("\\", "\\\\"); + defaultValue = defaultValue.replace("\\", "\\\\").replace("|", "\\|"); if (defaultValue.isEmpty()) { - builder.appendln("¦"); + builder.appendln("|"); } else { - builder.appendln("¦`+", defaultValue, "+`"); + builder.appendln("|`+", defaultValue, "+`"); } } private void writeDescription(AsciidocBuilder builder) { if (this.description == null || this.description.isEmpty()) { - builder.append("¦"); + builder.append("|"); } else { - builder.append("¦+++", this.description, "+++"); + String cleanedDescription = this.description.replace("|", "\\|"); + builder.append("|+++", cleanedDescription, "+++"); } } 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 85a9c7c6e9..0e06b59509 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 @@ -48,8 +48,8 @@ class CompoundConfigurationTableEntryTests { 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); + "|`+spring.test.first+` +" + NEWLINE + "`+spring.test.second+` +" + NEWLINE + "`+spring.test.third+` +" + + NEWLINE + NEWLINE + "|" + NEWLINE + "|+++This is a description.+++" + NEWLINE); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/ConfigurationTableTests.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/ConfigurationTableTests.java index 55b1d17881..2b15a47675 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/ConfigurationTableTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/ConfigurationTableTests.java @@ -46,10 +46,10 @@ class ConfigurationTableTests { second.setType("java.lang.String"); table.addEntry(new SingleConfigurationTableEntry(first)); table.addEntry(new SingleConfigurationTableEntry(second)); - assertThat(table.toAsciidocTable()).isEqualTo("[cols=\"1,1,2\", separator=¦, options=\"header\"]" + NEWLINE - + "|===" + NEWLINE + "¦Key¦Default Value¦Description" + NEWLINE + NEWLINE + "¦`+spring.test.other+`" - + NEWLINE + "¦`+other value+`" + NEWLINE + "¦+++This is another description.+++" + NEWLINE + NEWLINE - + "¦`+spring.test.prop+`" + NEWLINE + "¦`+something+`" + NEWLINE + "¦+++This is a description.+++" + assertThat(table.toAsciidocTable()).isEqualTo("[cols=\"1,1,2\", options=\"header\"]" + NEWLINE + "|===" + + NEWLINE + "|Key|Default Value|Description" + NEWLINE + NEWLINE + "|`+spring.test.other+`" + NEWLINE + + "|`+other value+`" + NEWLINE + "|+++This is another description.+++" + NEWLINE + NEWLINE + + "|`+spring.test.prop+`" + NEWLINE + "|`+something+`" + NEWLINE + "|+++This is a description.+++" + NEWLINE + NEWLINE + "|===" + NEWLINE); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntryTests.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntryTests.java index 642844cb6b..013320c729 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntryTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-docs/src/test/java/org/springframework/boot/configurationdocs/SingleConfigurationTableEntryTests.java @@ -41,8 +41,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦`+something+`" + NEWLINE - + "¦+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|`+something+`" + NEWLINE + + "|+++This is a description.+++" + NEWLINE); } @Test @@ -55,7 +55,7 @@ class SingleConfigurationTableEntryTests { AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); assertThat(builder.toString()).isEqualTo( - "¦`+spring.test.prop+`" + NEWLINE + "¦" + NEWLINE + "¦+++This is a description.+++" + NEWLINE); + "|`+spring.test.prop+`" + NEWLINE + "|" + NEWLINE + "|+++This is a description.+++" + NEWLINE); } @Test @@ -68,8 +68,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦`+first|second+`" + NEWLINE - + "¦+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|`+first\\|second+`" + NEWLINE + + "|+++This is a description.+++" + NEWLINE); } @Test @@ -82,8 +82,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦`+first\\\\second+`" + NEWLINE - + "¦+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|`+first\\\\second+`" + NEWLINE + + "|+++This is a description.+++" + NEWLINE); } @Test @@ -95,8 +95,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦" + NEWLINE - + "¦+++This is a description with a | pipe.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|" + NEWLINE + + "|+++This is a description with a \\| pipe.+++" + NEWLINE); } @Test @@ -109,7 +109,7 @@ class SingleConfigurationTableEntryTests { AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); assertThat(builder.toString()).isEqualTo( - "¦`+spring.test.prop.*+`" + NEWLINE + "¦" + NEWLINE + "¦+++This is a description.+++" + NEWLINE); + "|`+spring.test.prop.*+`" + NEWLINE + "|" + NEWLINE + "|+++This is a description.+++" + NEWLINE); } @Test @@ -123,8 +123,8 @@ class SingleConfigurationTableEntryTests { SingleConfigurationTableEntry entry = new SingleConfigurationTableEntry(property); AsciidocBuilder builder = new AsciidocBuilder(); entry.write(builder); - assertThat(builder.toString()).isEqualTo("¦`+spring.test.prop+`" + NEWLINE + "¦`+first," + NEWLINE + "second," - + NEWLINE + "third+`" + NEWLINE + "¦+++This is a description.+++" + NEWLINE); + assertThat(builder.toString()).isEqualTo("|`+spring.test.prop+`" + NEWLINE + "|`+first," + NEWLINE + "second," + + NEWLINE + "third+`" + NEWLINE + "|+++This is a description.+++" + NEWLINE); } }