openrewrite / rewrite-recipe-markdown-generator

Utility that generates OpenRewrite recipe documentation in markdown format for all recipes on the classpath.
Apache License 2.0
2 stars 7 forks source link

Description containing code block shows underscores instead of italics #65

Closed timtebeek closed 8 months ago

timtebeek commented 1 year ago

We sometimes add code blocks or other markdown to the description of recipes, most notably for rewrite refaster templates. This conflicts with the underscores that wrap the description to show italics, as for instance seen here: https://docs.openrewrite.org/recipes/java/migrate/lang/usestringisemptyrecipe Note the underscores before and after the code block. image

Since the description can contain any markdown, it's probably best not to wrap it with underscores: https://github.com/openrewrite/rewrite-recipe-markdown-generator/blob/7b5d4f0528e597b3abedcfac4fcaf4e5288ea327/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt#L636

There are alternatives, but given that the description can contain any markdown, we probably should just remove any wrapping markdown elements.

timtebeek commented 8 months ago

This has since been fixed for refaster recipes; might still affect recipes with a multiline description.