Skip to content

Commit

Permalink
MergeYaml example value should start on a new line
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Dec 3, 2024
1 parent cb38ec0 commit c50ef9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1321,11 +1321,13 @@ import TabItem from '@theme/TabItem';
if (!option.isRequired && option.example == null) {
continue
}
val ex = if (option.example != null && "String" == option.type &&
val ex = if (option.example != null && option.type == "String" &&
(option.example.matches("^[{}\\[\\],`|=%@*!?-].*".toRegex()) ||
option.example.matches(".*:\\s.*".toRegex()))
) {
"'" + option.example + "'"
} else if (option.example != null && option.type == "String" && option.example.contains('\n')) {
">\n " + option.example.replace("\n", "\n ")
} else if (option.type == "boolean") {
"false"
} else {
Expand Down

0 comments on commit c50ef9d

Please sign in to comment.