added prettyness to bookmarks
This commit is contained in:
parent
3b8dd53771
commit
582bc2795f
1 changed files with 2 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue