Forgot to update Atom & RSS generators for Markdown support
This commit is contained in:
parent
91849bdccd
commit
44e4729a23
|
@ -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 = '<![CDATA[' + f.read() + ']]>'
|
||||
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)
|
||||
|
|
|
@ -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', '<![CDATA[' + post_content + ']]>')
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user