This commit is contained in:
scria1000 2021-11-14 17:21:59 +03:00
parent ef1bdf2fa5
commit a52342b336
11 changed files with 13 additions and 14 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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++) {