aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2024-03-09 15:55:20 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2024-03-09 15:55:20 +0000
commit9afcb05eb534595d30791fce21e3b865a4beda8c (patch)
tree2e5f679450a91d0541dc3b4b18f14004583e27e7 /app/src/main
parent3ef64e2a170f91617d9e86a866d39b4ba4aa13e9 (diff)
downloadinfinity-for-reddit-9afcb05eb534595d30791fce21e3b865a4beda8c.tar
infinity-for-reddit-9afcb05eb534595d30791fce21e3b865a4beda8c.tar.gz
infinity-for-reddit-9afcb05eb534595d30791fce21e3b865a4beda8c.tar.bz2
infinity-for-reddit-9afcb05eb534595d30791fce21e3b865a4beda8c.tar.lz
infinity-for-reddit-9afcb05eb534595d30791fce21e3b865a4beda8c.tar.xz
infinity-for-reddit-9afcb05eb534595d30791fce21e3b865a4beda8c.tar.zst
infinity-for-reddit-9afcb05eb534595d30791fce21e3b865a4beda8c.zip
Inline code richtext_json.
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