Fixed non breaking spaces / markdown

This commit is contained in:
M66B 2024-02-18 17:50:30 +01:00
parent 4dc5e6ab7d
commit 4d16285f8c
1 changed files with 3 additions and 1 deletions

View File

@ -6726,7 +6726,9 @@ public class FragmentCompose extends FragmentBase {
StrikethroughExtension.create()));
Parser parser = Parser.builder(options).build();
HtmlRenderer renderer = HtmlRenderer.builder(options).build();
String html = renderer.render(parser.parse(spanned.toString()));
String text = spanned.toString().replace('\u00a0', ' ');
String html = renderer.render(parser.parse(text));
Document doc = JsoupEx.parse(html);
doc.body().attr("markdown", Boolean.toString(markdown));