|
@@ -133,6 +133,12 @@ proc getTombstone*(js: JsonNode): string =
|
|
|
result = js{"tombstoneInfo", "richText", "text"}.getStr
|
|
result = js{"tombstoneInfo", "richText", "text"}.getStr
|
|
|
result.removeSuffix(" Learn more")
|
|
result.removeSuffix(" Learn more")
|
|
|
|
|
|
|
|
|
|
+proc getSource*(js: JsonNode): string =
|
|
|
|
|
+ let
|
|
|
|
|
+ raw_src = js["source"].getStr
|
|
|
|
|
+ src = raw_src.substr(raw_src.find('>') + 1, raw_src.rfind('<') - 1)
|
|
|
|
|
+ return src
|
|
|
|
|
+
|
|
|
proc extractSlice(js: JsonNode): Slice[int] =
|
|
proc extractSlice(js: JsonNode): Slice[int] =
|
|
|
result = js["indices"][0].getInt ..< js["indices"][1].getInt
|
|
result = js["indices"][0].getInt ..< js["indices"][1].getInt
|
|
|
|
|
|