--- MoinMoin/formatter/text_html.py.orig 2006-02-03 22:25:29.000000000 +0100
+++ MoinMoin/formatter/text_html.py 2006-02-16 22:52:01.176619922 +0100
@@ -27,7 +27,7 @@
# when they don't have a closing tag even if valid XHTML.
_self_closing_tags = Set(['area', 'base', 'br', 'col', 'frame', 'hr', 'img', 'input',
- 'isindex', 'link', 'meta', 'param'])
+ 'isindex', 'link', 'meta', 'param', 'p'])
# These are the elements which generally should cause an increase in the
# indention level in the html souce code.
@@ -1083,6 +1083,23 @@
# Lists ##############################################################
+ def _ol_css(self, type):
+
+ if type == '1':
+ ret = 'decimal'
+ elif type == 'a':
+ ret = 'lower-latin'
+ elif type == 'A':
+ ret = 'upper-latin'
+ elif type == 'i':
+ ret = 'lower-roman'
+ elif type == 'I':
+ ret = 'upper-roman'
+ else:
+ raise ValueError, type
+ return 'list-style-type: %s' % ret
+
+
def number_list(self, on, type=None, start=None, **kw):
"""Creates an HTML ordered list,
element.
@@ -1099,7 +1116,7 @@
if on:
attr = {}
if type is not None:
- attr['type'] = type
+ attr['style'] = self._ol_css(type)
if start is not None:
attr['start'] = start
tagstr = self._open(tag, newline=1, attr=attr, **kw)
--- MoinMoin/parser/wiki.py.orig 2006-02-16 22:07:22.786557495 +0100
+++ MoinMoin/parser/wiki.py 2006-02-16 22:50:56.443856172 +0100
@@ -742,6 +742,7 @@
# return the complete cell markup
result.append(self.formatter.table_cell(1, attrs) + attrerr)
+ result.append(self._line_anchordef())
return ''.join(result)
else:
return self.formatter.text(word)
@@ -916,6 +917,13 @@
return ""
+ def _line_anchordef(self):
+ if self.line_anchors and not self.line_anchor_printed:
+ self.line_anchor_printed = 1
+ return self.formatter.line_anchordef(self.lineno)
+ else:
+ return ''
+
def format(self, formatter):
""" For each line, scan through looking for magic
strings, outputting verbatim any intervening text.
@@ -951,8 +959,9 @@
# Main loop
for line in self.lines:
self.lineno += 1
- if self.line_anchors:
- self.request.write(self.formatter.line_anchordef(self.lineno))
+ self.line_anchor_printed = 0
+ if not self.in_table:
+ self.request.write(self._line_anchordef())
self.table_rowstart = 1
self.line_was_empty = self.line_is_empty
self.line_is_empty = 0
@@ -1026,6 +1035,7 @@
if not line.strip():
if self.in_table:
self.request.write(self.formatter.table(0))
+ self.request.write(self._line_anchordef())
self.in_table = 0
# CHANGE: removed check for not self.list_types
# p should close on every empty line
@@ -1087,6 +1097,7 @@
# Close table
self.request.write(self.formatter.table(0))
+ self.request.write(self._line_anchordef())
self.in_table = 0
# Scan line, format and write