Markdown: workaround not escaping ordered lists

This commit is contained in:
M66B 2024-02-22 10:22:49 +01:00
parent c152a5c3ca
commit 98352ec247
1 changed files with 3 additions and 1 deletions

View File

@ -63,6 +63,8 @@ public class Markdown {
String markdown = FlexmarkHtmlConverter.builder(options)
.build()
.convert(html);
return markdown.replaceAll("\n\n\\s+<!-- -->\n", "");
return markdown
.replaceAll("(?m)^( *)(\\d+)\\.( +)", "$1$2\\\\.$3")
.replaceAll("\n\n\\s+<!-- -->\n", "");
}
}