Skip to content

Commit

Permalink
Additional clean ups for error-prone descriptions
Browse files Browse the repository at this point in the history
Fixes #93
  • Loading branch information
timtebeek committed Dec 23, 2024
1 parent dbee4fb commit 0c5dad8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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("<p>", "")
.replace("<pre>{@code", "```java")
.replace("}</pre>", "```")
.replaceAll("(?s)\\{@\\S+\\s+(.*?)}", "`$1`")
.replace("\\", "\\\\")
.replace("\"", "\\\"")
.replace("\b", "\\b")
Expand Down

0 comments on commit 0c5dad8

Please sign in to comment.