Skip to content

Commit c50ef9d

Browse files
committed
MergeYaml example value should start on a new line
Fixes openrewrite/rewrite#4736
1 parent cb38ec0 commit c50ef9d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,11 +1321,13 @@ import TabItem from '@theme/TabItem';
13211321
if (!option.isRequired && option.example == null) {
13221322
continue
13231323
}
1324-
val ex = if (option.example != null && "String" == option.type &&
1324+
val ex = if (option.example != null && option.type == "String" &&
13251325
(option.example.matches("^[{}\\[\\],`|=%@*!?-].*".toRegex()) ||
13261326
option.example.matches(".*:\\s.*".toRegex()))
13271327
) {
13281328
"'" + option.example + "'"
1329+
} else if (option.example != null && option.type == "String" && option.example.contains('\n')) {
1330+
">\n " + option.example.replace("\n", "\n ")
13291331
} else if (option.type == "boolean") {
13301332
"false"
13311333
} else {

0 commit comments

Comments
 (0)