diff --git a/generators/atom.py b/generators/atom.py index 0cbc1ed..06a45e7 100644 --- a/generators/atom.py +++ b/generators/atom.py @@ -24,6 +24,7 @@ from dynastie.generators.generator import DynastieGenerator from dynastie.generators.rss import RSS from xml.dom.minidom import getDOMImplementation from django.db import models +from dynastie.generators import markdown2 class Atom(RSS): @@ -80,6 +81,9 @@ class Atom(RSS): post_content = '' f.close() + if post.content_format == Post.CONTENT_TEXT: + post_content = markdown2.markdown(post_content) + self.appendElement(dom, item, 'summary', post_content, {'type':'html'}) self.appendElement(dom, item, 'content', post_content, {'type':'html'}) root.appendChild(item) diff --git a/generators/rss.py b/generators/rss.py index d851fd6..b399931 100644 --- a/generators/rss.py +++ b/generators/rss.py @@ -23,6 +23,8 @@ import xml from dynastie.generators.generator import DynastieGenerator from xml.dom.minidom import getDOMImplementation from django.db import models +from dynastie.generators import markdown2 + class RSS(DynastieGenerator): @@ -78,6 +80,9 @@ class RSS(DynastieGenerator): post_content = f.read() f.close() + if post.content_format == Post.CONTENT_TEXT: + post_content = markdown2.markdown(post_content) + self.appendElement(dom, item, 'description', '') try: