Allow to specify root HTML node for RST formatter
It turns out that many RSS readers (or at least two I'm using: http://feedly.com and http://twentyfivesquares.com/press/) do not handle non-HTML tags in Atom content tag and skipping the whole content of it. This patch allows to specify different (in this case <div>) node to make readers happy.
This commit is contained in:
parent
c375e39983
commit
1ecca84b2e
1 changed files with 1 additions and 1 deletions
|
|
@ -467,7 +467,7 @@ proc rstToHtml(content: string): string =
|
|||
# TODO: Yes, this is ugly. I wrote it quickly. PRs welcome ;)
|
||||
try:
|
||||
var node = parseHtml(newStringStream(result))
|
||||
var newNode = newElement("document")
|
||||
var newNode = newElement("div")
|
||||
if node.kind == xnElement:
|
||||
var currentBlockquote = newElement("blockquote")
|
||||
for n in items(node):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue