From 32b7f8f42f6b725800521844596550602dfe7d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Ram=C3=ADrez?= Date: Thu, 24 Oct 2013 12:09:15 -0600 Subject: [PATCH] Adding support for ul and ol convertion. --- markdown_map.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/markdown_map.py b/markdown_map.py index 5e480e9..77b4d24 100644 --- a/markdown_map.py +++ b/markdown_map.py @@ -1,5 +1,7 @@ #!/usr/bin/python +from random import randint + # Transform map used by the markdown filter. transform_map have # instructions of how to transform a HTML style tag into a ODT document # styled tag. Some ODT tags may need extra attributes; these are defined @@ -39,7 +41,7 @@ common_styles = { } }, - 'p': { + 'p': { 'replace_with': 'text:p', 'style_attributes': { 'style-name': 'Standard' @@ -104,4 +106,22 @@ transform_map = { 'style-name': 'Preformatted_20_Text' } }, + + 'ul': { + 'replace_with': 'text:list', + 'attributes': { + 'xml:id': 'list' + str(randint(100000000000000000,900000000000000000)) + } + }, + + 'ol': { + 'replace_with': 'text:list', + 'attributes': { + 'xml:id': 'list' + str(randint(100000000000000000,900000000000000000)) + } + }, + + 'li': { + 'replace_with': 'text:list-item' + }, } \ No newline at end of file