aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/markdown/RichTextJSONConverter.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/RichTextJSONConverter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/RichTextJSONConverter.java
index 1b55eb6c..5b9fa29d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/RichTextJSONConverter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/markdown/RichTextJSONConverter.java
@@ -184,10 +184,13 @@ public class RichTextJSONConverter implements Visitor {
@Override
public void visit(Code code) {
- JSONArray format = getFormatArray(code);
- if (format != null) {
- formats.add(format);
- }
+ JSONArray format = new JSONArray();
+ format.put(INLINE_CODE);
+ format.put(textSB.length());
+ format.put(code.getLiteral().length());
+ formats.add(format);
+
+ textSB.append(code.getLiteral());
}
@Override