Skip to content

Commit

Permalink
Show valid options in a list
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Dec 13, 2023
1 parent beaabd1 commit c65ebf6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,13 @@ class RecipeMarkdownGenerator : Runnable {
description = description.replace("method patterns?".toRegex(RegexOption.IGNORE_CASE)) { match ->
"[${match.value}](/reference/method-patterns.md)"
}
// Add valid options to description
if (option.valid != null && option.valid.isNotEmpty()) {
description += "\n\nValid options:\n"
option.valid.forEach { validOption ->
description += "* `$validOption`\n"
}
}
writeln(
"""
| `${option.type}` | ${option.name} | $description | `${option.example}` |
Expand Down

0 comments on commit c65ebf6

Please sign in to comment.