From 74993fb737883670b068371b0c1d3dadd6527155 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 6 Nov 2019 15:26:43 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/help/storage/OldRule.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/storage/OldRule.kt b/app/src/main/java/io/legado/app/help/storage/OldRule.kt index e58c3d682..ede6f2c13 100644 --- a/app/src/main/java/io/legado/app/help/storage/OldRule.kt +++ b/app/src/main/java/io/legado/app/help/storage/OldRule.kt @@ -75,8 +75,12 @@ object OldRule { nextTocUrl = jsonItem.readString("ruleChapterUrlNext") ) ruleToc = GSON.toJson(chapterRule) + var content = jsonItem.readString("ruleBookContent") ?: "" + if (content.startsWith("$") && !content.startsWith("$.")) { + content = content.substring(1) + } val contentRule = ContentRule( - content = jsonItem.readString("ruleBookContent"), + content = content, nextContentUrl = jsonItem.readString("ruleContentUrlNext") ) ruleContent = GSON.toJson(contentRule)