added prettyness to bookmarks

This commit is contained in:
Paul Wilde 2022-10-21 17:19:22 +01:00
parent 3b8dd53771
commit 582bc2795f

View file

@ -34,9 +34,8 @@ proc getTitle(bookmark: Bookmark): Future[string] {.async.} =
return ""
proc save(bookmarks: seq[Bookmark]): bool {.discardable.} =
let file = open(bookmarks_file, fm_write)
defer: file.close()
file.write($$bookmarks)
let data = pretty(%*bookmarks)
writeFile(bookmarks_file, data)
proc get(bookmarks: seq[Bookmark], str: string): Bookmark =
for bookmark in bookmarks: