mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-30 19:34:45 +01:00
Merge pull request #525 from scria1000/comment-markdown-fix
Fix markdown not rendering in some comments
This commit is contained in:
commit
4bd6ae0c4c
@ -137,7 +137,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
@Override
|
@Override
|
||||||
public void afterSetText(@NonNull TextView textView) {
|
public void afterSetText(@NonNull TextView textView) {
|
||||||
textView.setHighlightColor(Color.TRANSPARENT);
|
textView.setHighlightColor(Color.TRANSPARENT);
|
||||||
SpannableStringBuilder markdownStringBuilder = new SpannableStringBuilder(textView.getText().toString());
|
SpannableStringBuilder markdownStringBuilder = new SpannableStringBuilder(textView.getText());
|
||||||
Pattern spoilerPattern = Pattern.compile(">![\\S\\s]+?!<");
|
Pattern spoilerPattern = Pattern.compile(">![\\S\\s]+?!<");
|
||||||
Matcher matcher = spoilerPattern.matcher(markdownStringBuilder);
|
Matcher matcher = spoilerPattern.matcher(markdownStringBuilder);
|
||||||
int start = 0;
|
int start = 0;
|
||||||
|
@ -180,7 +180,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterSetText(@NonNull TextView textView) {
|
public void afterSetText(@NonNull TextView textView) {
|
||||||
SpannableStringBuilder markdownStringBuilder = new SpannableStringBuilder(textView.getText().toString());
|
SpannableStringBuilder markdownStringBuilder = new SpannableStringBuilder(textView.getText());
|
||||||
Pattern spoilerPattern = Pattern.compile(">![\\S\\s]+?!<");
|
Pattern spoilerPattern = Pattern.compile(">![\\S\\s]+?!<");
|
||||||
Matcher matcher = spoilerPattern.matcher(markdownStringBuilder);
|
Matcher matcher = spoilerPattern.matcher(markdownStringBuilder);
|
||||||
int start = 0;
|
int start = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user