Skip to content

Commit

Permalink
Do not show `` when example is null
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Dec 13, 2023
1 parent a7d922e commit aaa902d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -839,9 +839,10 @@ class RecipeMarkdownGenerator : Runnable {
if (option.valid?.isNotEmpty()?: false) {
description += " Valid options: " + option.valid?.joinToString { "`$it`" }
}
val example = if (option.example != null) "`${option.example}`" else ""
writeln(
"""
| `${option.type}` | ${option.name} | $description | `${option.example ?: ""}` |
| `${option.type}` | ${option.name} | $description | $example |
""".trimIndent()
)
}
Expand Down

0 comments on commit aaa902d

Please sign in to comment.