mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix line breaks with Markdown
This commit is contained in:
parent
147917fc58
commit
c9a86aae01
1 changed files with 2 additions and 0 deletions
|
@ -91,6 +91,7 @@ import app.fedilab.android.mastodon.ui.drawer.StatusAdapter;
|
|||
import app.fedilab.android.mastodon.viewmodel.mastodon.FiltersVM;
|
||||
import es.dmoral.toasty.Toasty;
|
||||
import io.noties.markwon.Markwon;
|
||||
import io.noties.markwon.SoftBreakAddsNewLinePlugin;
|
||||
import io.noties.markwon.ext.tables.TablePlugin;
|
||||
import io.noties.markwon.syntax.Prism4jThemeDefault;
|
||||
import io.noties.markwon.syntax.SyntaxHighlightPlugin;
|
||||
|
@ -184,6 +185,7 @@ public class SpannableHelper {
|
|||
|
||||
final Markwon markwon = Markwon.builder(context)
|
||||
.usePlugin(TablePlugin.create(context))
|
||||
.usePlugin(SoftBreakAddsNewLinePlugin.create())
|
||||
.usePlugin(SyntaxHighlightPlugin.create(new Prism4j(new MySuperGrammerLocator()), Prism4jThemeDefault.create())).build();
|
||||
|
||||
final Spanned markdown = markwon.toMarkdown(initialContent.toString());
|
||||
|
|
Loading…
Reference in a new issue