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 ""
|
return ""
|
||||||
|
|
||||||
proc save(bookmarks: seq[Bookmark]): bool {.discardable.} =
|
proc save(bookmarks: seq[Bookmark]): bool {.discardable.} =
|
||||||
let file = open(bookmarks_file, fm_write)
|
let data = pretty(%*bookmarks)
|
||||||
defer: file.close()
|
writeFile(bookmarks_file, data)
|
||||||
file.write($$bookmarks)
|
|
||||||
|
|
||||||
proc get(bookmarks: seq[Bookmark], str: string): Bookmark =
|
proc get(bookmarks: seq[Bookmark], str: string): Bookmark =
|
||||||
for bookmark in bookmarks:
|
for bookmark in bookmarks:
|
||||||
|
|
Loading…
Reference in a new issue