]> Sergey Matveev's repositories - public-inbox.git/commitdiff
atom: show metadata before message body
authorEric Wong <e@80x24.org>
Fri, 26 Jan 2018 21:54:00 +0000 (21:54 +0000)
committerEric Wong <e@80x24.org>
Fri, 26 Jan 2018 21:54:00 +0000 (21:54 +0000)
This can allow streaming parsers (SAX) to work a little more
efficiently as they can handle/discard all the metadata before
the big content.

lib/PublicInbox/WwwAtomStream.pm

index b9c7468f18920d05025979c5dad6f1e547fddc21..ecb82bc39bec19a319ccc33380e6da180fc7723a 100644 (file)
@@ -129,13 +129,13 @@ sub feed_entry {
        }
        $s .= "<entry><author><name>$name</name><email>$email</email>" .
                "</author>$title$updated" .
+               qq(<link\nhref="$href"/>).
+               "<id>$uuid</id>$irt" .
                qq{<content\ntype="xhtml">} .
                qq{<div\nxmlns="http://www.w3.org/1999/xhtml">} .
                qq(<pre\nstyle="white-space:pre-wrap">) .
                PublicInbox::View::multipart_text_as_html($mime, $href) .
-               '</pre>' .
-               qq!</div></content><link\nhref="$href"/>!.
-               "<id>$uuid</id>$irt</entry>";
+               '</pre></div></content></entry>';
 }
 
 sub feed_updated {