mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 08:40:03 +02:00
Fix maths converter
This commit is contained in:
parent
e954fd860a
commit
ba0fc54cbc
1 changed files with 5 additions and 1 deletions
|
@ -762,7 +762,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
MathJaxView mathview = new MathJaxView(context, mathJaxConfig);
|
MathJaxView mathview = new MathJaxView(context, mathJaxConfig);
|
||||||
holder.binding.statusContentMaths.addView(mathview);
|
holder.binding.statusContentMaths.addView(mathview);
|
||||||
if (status.contentSpan != null) {
|
if (status.contentSpan != null) {
|
||||||
String input = status.contentSpan.toString();
|
String input;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||||
|
input = new SpannableString(Html.fromHtml(status.content, Html.FROM_HTML_MODE_LEGACY)).toString();
|
||||||
|
else
|
||||||
|
input = new SpannableString(Html.fromHtml(status.content)).toString();
|
||||||
input = input.replaceAll("'", "'");
|
input = input.replaceAll("'", "'");
|
||||||
input = input.replaceAll("\"", """);
|
input = input.replaceAll("\"", """);
|
||||||
mathview.setInputText(input);
|
mathview.setInputText(input);
|
||||||
|
|
Loading…
Reference in a new issue