From 489217527dc938f409bfc7019d3082d28483e8bb Mon Sep 17 00:00:00 2001 From: Matthew Tretter Date: Fri, 29 Jun 2012 13:39:54 -0400 Subject: [PATCH] Preserve attributes for conversion --- markdownify/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/markdownify/__init__.py b/markdownify/__init__.py index 51c1b3d..5c22c8a 100644 --- a/markdownify/__init__.py +++ b/markdownify/__init__.py @@ -43,8 +43,10 @@ class MarkdownConverter(object): text += tail - node.clear() + while len(node): + del node[0] node.text = text + node.tail = '' def __getattr__(self, attr): # Handle heading levels > 2