diff options
| author | John Conway <john.a.conway@gmail.com> | 2019-05-08 12:54:17 +0100 |
|---|---|---|
| committer | John Conway <john.a.conway@gmail.com> | 2019-05-08 12:54:17 +0100 |
| commit | 02d25f9e12bd92b6aab53180f73e6c226a86f63c (patch) | |
| tree | ebea4ec86ce3ecddcfff3855266929b70c578680 /src | |
| parent | c011f88e6342a56d0b7bc831a9c0b84a780ac410 (diff) | |
| download | feed-nim-02d25f9e12bd92b6aab53180f73e6c226a86f63c.tar.gz feed-nim-02d25f9e12bd92b6aab53180f73e6c226a86f63c.zip | |
Minor formatting
Diffstat (limited to 'src')
| -rw-r--r-- | src/feednim/atom.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/feednim/atom.nim b/src/feednim/atom.nim index b33f718..133e887 100644 --- a/src/feednim/atom.nim +++ b/src/feednim/atom.nim @@ -106,7 +106,7 @@ proc parseEntry( node: XmlNode) : AtomEntry = entry.updated = node.child("updated").innerText # Fill the optinal fields - entry.authors = parseAuthors(node) + entry.authors = node.parseAuthors() if node.child("category") != nil: entry.category = map(node.findAll("category"), (x: XmlNode) -> string => x.innerText) @@ -118,19 +118,19 @@ proc parseEntry( node: XmlNode) : AtomEntry = if node.attr("src") != "": entry.contentSrc = node.attr("src") if node.child("contributor") != nil: - entry.contributors = parseAuthors(node, mode="contributor") + entry.contributors = node.parseAuthors(mode="contributor") if node.child("link") != nil: entry.link = node.child("link").parseLink() - if node.child("published") != nil: entry.published = node.child("published").innerText if node.child("rights") != nil: entry.rights = node.child("rights").innerText if node.child("source") != nil: let source = node.child("source") + if node.child("author") != nil: entry.source.authors = source.parseAuthors() if node.child("category") != nil: entry.source.category = map(source.findAll("category"), (x: XmlNode) -> string => x.innerText) - if node.child("contributor") != nil: entry.source.contributors = parseAuthors(source, mode="contributor") + if node.child("contributor") != nil: entry.source.contributors = source.parseAuthors(mode="contributor") if source.child("generator") != nil: entry.source.generator = source.child("generator").innerText if source.child("icon") != nil: entry.source.generator = source.child("icon").innerText if source.child("id") != nil: entry.source.id = source.child("id").innerText |
