diff options
| author | John Conway <john.a.conway@gmail.com> | 2019-05-17 15:36:59 +0100 |
|---|---|---|
| committer | John Conway <john.a.conway@gmail.com> | 2019-05-17 15:36:59 +0100 |
| commit | e6affb91d689161971d73a70f22400e32a14324a (patch) | |
| tree | 0621b1fa4c8a37ec5579514aaef2925c6a8f5ea1 /src/feednim | |
| parent | 289cd01606adcdf4803307c8fc761c7bdc5a84f7 (diff) | |
| download | feed-nim-e6affb91d689161971d73a70f22400e32a14324a.tar.gz feed-nim-e6affb91d689161971d73a70f22400e32a14324a.zip | |
Pack structure (capitalised FeedNim)
Diffstat (limited to 'src/feednim')
| -rw-r--r-- | src/feednim/atom.nim | 4 | ||||
| -rw-r--r-- | src/feednim/jsonfeed.nim | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/feednim/atom.nim b/src/feednim/atom.nim index bbdcbe9..ee60672 100644 --- a/src/feednim/atom.nim +++ b/src/feednim/atom.nim @@ -58,7 +58,7 @@ type linktype*: string hreflang*: string title*: string - length*: string + length*: int AtomEntry* = ref object of AtomCommon id*: string # Required Atom field @@ -137,7 +137,7 @@ func parseLink ( node: XmlNode ): AtomLink = if node.attr("type") != "": link.linktype = node.attr("type") if node.attr("hreflang") != "": link.hreflang = node.attr("hreflang") if node.attr("title") != "": link.title = node.attr("title") - if node.attr("length") != "": link.length = node.attr("length") + if node.attr("length") != "": link.length = node.attr("length").parseInt() return link func parseText ( node: XmlNode ): string = diff --git a/src/feednim/jsonfeed.nim b/src/feednim/jsonfeed.nim index e6562a2..e523778 100644 --- a/src/feednim/jsonfeed.nim +++ b/src/feednim/jsonfeed.nim @@ -10,7 +10,7 @@ import streams import sugar type - JSONFeed* = object + JSONFeed* = ref object of RootObj author*: JSONFeedAuthor version*: string title*: string |
