mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-27 19:38:22 +01:00
Refactor
This commit is contained in:
parent
ef1bdf2fa5
commit
a52342b336
@ -177,7 +177,7 @@ public class CommentActivity extends BaseActivity implements UploadImageEnabledA
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -231,7 +231,7 @@ public class CommentActivity extends BaseActivity implements UploadImageEnabledA
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -148,7 +148,7 @@ public class FullMarkdownActivity extends BaseActivity {
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -173,7 +173,7 @@ public class WikiActivity extends BaseActivity {
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -133,7 +133,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -178,7 +178,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -117,7 +117,7 @@ public class MessageRecyclerViewAdapter extends PagedListAdapter<Message, Recycl
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -243,7 +243,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -83,7 +83,7 @@ public class PrivateMessagesDetailRecyclerViewAdapter extends RecyclerView.Adapt
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,7 +58,7 @@ public class RulesRecyclerViewAdapter extends RecyclerView.Adapter<RulesRecycler
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -122,7 +122,7 @@ public class SidebarFragment extends Fragment {
|
||||
@NonNull
|
||||
@Override
|
||||
public String processMarkdown(@NonNull String markdown) {
|
||||
return super.processMarkdown(Utils.fixSuperScript(new StringBuilder(markdown)));
|
||||
return super.processMarkdown(markdown);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -73,11 +73,10 @@ public class Utils {
|
||||
.replaceAll("(^|^ *|\\n *)#####(?!($|\\s|#))", "$0 ")
|
||||
.replaceAll("(^|^ *|\\n *)######(?!($|\\s|#))", "$0 "));
|
||||
|
||||
//return fixSuperScript(regexed);
|
||||
return regexed.toString();
|
||||
return fixSuperScript(regexed);
|
||||
}
|
||||
|
||||
public static String fixSuperScript(StringBuilder regexed) {
|
||||
private static String fixSuperScript(StringBuilder regexed) {
|
||||
boolean hasBracket = false;
|
||||
int nCarets = 0;
|
||||
for (int i = 0; i < regexed.length(); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user