diff --git a/src/main/java/org/openrewrite/java/template/processor/RefasterTemplateProcessor.java b/src/main/java/org/openrewrite/java/template/processor/RefasterTemplateProcessor.java index 5be160e..0936488 100644 --- a/src/main/java/org/openrewrite/java/template/processor/RefasterTemplateProcessor.java +++ b/src/main/java/org/openrewrite/java/template/processor/RefasterTemplateProcessor.java @@ -485,7 +485,10 @@ private String recipeDescriptor(JCTree.JCClassDecl classDecl, String defaultDisp Tokens.Comment comment = cu.docComments.getComment(classDecl); if (comment != null && comment.getText() != null && !comment.getText().isEmpty()) { String commentText = comment.getText() - .replaceAll("\\{@\\S+\\s+(.*?)}", "`$1`") + .replace("
", "") + .replace("
{@code", "```java") + .replace("}", "```") + .replaceAll("(?s)\\{@\\S+\\s+(.*?)}", "`$1`") .replace("\\", "\\\\") .replace("\"", "\\\"") .replace("\b", "\\b")