aboutsummaryrefslogtreecommitdiff
path: root/src/feednim/atom.nim
diff options
context:
space:
mode:
authorJohn Conway <john.a.conway@gmail.com>2019-05-17 15:36:59 +0100
committerJohn Conway <john.a.conway@gmail.com>2019-05-17 15:36:59 +0100
commite6affb91d689161971d73a70f22400e32a14324a (patch)
tree0621b1fa4c8a37ec5579514aaef2925c6a8f5ea1 /src/feednim/atom.nim
parent289cd01606adcdf4803307c8fc761c7bdc5a84f7 (diff)
downloadfeed-nim-e6affb91d689161971d73a70f22400e32a14324a.tar.gz
feed-nim-e6affb91d689161971d73a70f22400e32a14324a.zip
Pack structure (capitalised FeedNim)
Diffstat (limited to 'src/feednim/atom.nim')
-rw-r--r--src/feednim/atom.nim4
1 files changed, 2 insertions, 2 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 =