aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MessageRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RulesRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java5
11 files changed, 13 insertions, 14 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java
index d095428f..0d84fd8b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java
index 12545d44..5de7106f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java
index ca206b8b..9cd26d46 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java
index 91827d06..5c85c4b2 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java
index 1862bb9e..547be15c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MessageRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MessageRecyclerViewAdapter.java
index 3084c63f..0d4b8f7a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MessageRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MessageRecyclerViewAdapter.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java
index dec86c7b..4128adf3 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java
index 6480e886..73046bfc 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RulesRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RulesRecyclerViewAdapter.java
index 4a603c94..1d20a3ec 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RulesRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RulesRecyclerViewAdapter.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java
index ff31ccae..671c7a84 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java
@@ -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
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java
index 525dfa2a..4ea493f4 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java
@@ -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++) {