# HG changeset patch # User Kim Alvefur # Date 1381236307 -7200 # Node ID d2cb5800ab275223250b288991435baec4a45099 # Parent 8bb289b2b7be17b77508871405d33e33a00e84e0 clix.publish_atom: Set type attribute on title, summary and content from --FIELD-type arguments diff -r 8bb289b2b7be -r d2cb5800ab27 clix/publish_atom.lua --- a/clix/publish_atom.lua Fri Jul 12 04:16:46 2013 +0200 +++ b/clix/publish_atom.lua Tue Oct 08 14:45:07 2013 +0200 @@ -25,16 +25,16 @@ local entry_id = opts.id or new_uuid(); local atom_entry = verse.stanza("entry", { xmlns = xmlns_atom}) :tag("id"):text(entry_id):up() - :tag("title"):text(opts.title or ""):up() + :tag("title", { type = opts["title-type"] }):text(opts.title or ""):up() :tag("updated"):text(opts.updated or datetime()):up(); atom_entry:tag("author"):tag("name"):text(opts.author or os.getenv("USER") or "Unknown author"):up(); atom_entry:up(); if opts.summary then - atom_entry:tag("summary"):text(opts.summary):up(); + atom_entry:tag("summary", { type = opts["summary-type"] }):text(opts.summary):up(); end if opts.content then - atom_entry:tag("content"):text(opts.content):up(); + atom_entry:tag("content", { type = opts["content-type"] }):text(opts.content):up(); end for opt, optval in pairs(opts) do