mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Minor fixes, update tests
This commit is contained in:
parent
ce5cbaeb87
commit
2536370cd7
2 changed files with 3 additions and 10 deletions
|
|
@ -134,10 +134,8 @@ proc getTombstone*(js: JsonNode): string =
|
|||
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
|
||||
let src = js{"source"}.getStr
|
||||
result = src.substr(src.find('>') + 1, src.rfind('<') - 1)
|
||||
|
||||
proc extractSlice(js: JsonNode): Slice[int] =
|
||||
result = js["indices"][0].getInt ..< js["indices"][1].getInt
|
||||
|
|
|
|||
Loading…
Reference in a new issue