mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Add OL processing to RML
This commit is contained in:
@@ -77,6 +77,14 @@
|
||||
<lineStyle kind="linebelow" start="3,0" stop="3,0" colorName="black"/>
|
||||
<lineStyle kind="linebelow" start="5,0" stop="5,0" colorName="black"/>
|
||||
</blockTableStyle>
|
||||
|
||||
<listStyle name="ol"
|
||||
bulletFormat="%s."
|
||||
bulletFontSize="10" />
|
||||
|
||||
<listStyle name="ul"
|
||||
start="square"
|
||||
bulletFontSize="8" />
|
||||
</stylesheet>
|
||||
|
||||
<template > {# Note: page is 595x842 points (1 point=1/72in) #}
|
||||
@@ -128,4 +136,4 @@
|
||||
{% include "RIGS/event_print_page.xml" %}
|
||||
</story>
|
||||
|
||||
</document>
|
||||
</document>
|
||||
|
||||
@@ -30,10 +30,9 @@ def markdown_filter(text, format='html'):
|
||||
bq.name = 'pre'
|
||||
bq.string = bq.text
|
||||
|
||||
for ul in soup('ul'):
|
||||
ul['value'] = 'square'
|
||||
ul['bulletFontSize'] = '8'
|
||||
for li in ul.findAll('li'):
|
||||
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 = ''
|
||||
@@ -41,7 +40,7 @@ def markdown_filter(text, format='html'):
|
||||
indent = soup.new_tag('indent')
|
||||
indent['left'] = '1.2cm'
|
||||
|
||||
content = ul.replace_with(indent)
|
||||
content = list.replace_with(indent)
|
||||
indent.append(content)
|
||||
|
||||
# Paragraphs have a different tag
|
||||
|
||||
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
Reference in New Issue
Block a user