diff --git a/RIGS/templates/RIGS/event_print_page.xml b/RIGS/templates/RIGS/event_print_page.xml index 2de4b74f..83b53fe6 100644 --- a/RIGS/templates/RIGS/event_print_page.xml +++ b/RIGS/templates/RIGS/event_print_page.xml @@ -189,7 +189,7 @@ {{ item.name }} {% if item.description %} - + {{ item.description|markdown:"rml" }} diff --git a/RIGS/templatetags/markdown_tags.py b/RIGS/templatetags/markdown_tags.py index ce8826d6..52d04cf4 100644 --- a/RIGS/templatetags/markdown_tags.py +++ b/RIGS/templatetags/markdown_tags.py @@ -32,16 +32,15 @@ def markdown_filter(text, format='html'): for list in soup.findAll(['ul','ol']): list['style'] = list.name - for li in list.findAll('li'): - p = soup.new_tag('p') - p.string = li.text - li.string = '' - li.append(p) - indent = soup.new_tag('indent') - indent['left'] = '1.2cm' + for li in list.findAll('li', recursive=False): + text = li.find(text=True) + text.wrap(soup.new_tag('p')) - content = list.replace_with(indent) - indent.append(content) + if list.parent.name != 'li': + indent = soup.new_tag('indent') + indent['left'] = '0.6cm' + + list.wrap(indent) # Paragraphs have a different tag for p in soup('p'): diff --git a/db.sqlite3 b/db.sqlite3 index 315850db..44083137 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ