Attachment 'moin-1.5.4-parindent-2.patch'
Download 1 --- moin-1.5.4/MoinMoin/parser/wiki.py.orig 2006-05-11 11:24:00.000000000 -0500
2 +++ moin-1.5.4/MoinMoin/parser/wiki.py 2006-07-31 14:37:28.000000000 -0500
3 @@ -461,15 +461,7 @@
4
5 def _indent_repl(self, match):
6 """Handle pure indentation (no - * 1. markup)."""
7 - result = []
8 - if not (self.in_li or self.in_dd):
9 - self._close_item(result)
10 - self.in_li = 1
11 - css_class = None
12 - if self.line_was_empty and not self.first_list_item:
13 - css_class = 'gap'
14 - result.append(self.formatter.listitem(1, css_class=css_class, style="list-style-type:none"))
15 - return ''.join(result)
16 + return ""
17
18 def _li_none_repl(self, match):
19 """Handle type=none (" .") lists."""
20 @@ -545,7 +537,7 @@
21 self.in_li = 1
22
23 # Open new list, if necessary
24 - if self._indent_level() < new_level:
25 + if list_type and self._indent_level() < new_level:
26 self.list_indents.append(new_level)
27 self.list_types.append(list_type)
28
29 @@ -879,7 +871,7 @@
30 ###result.append('<span class="info">[no match, add rest: <tt>"%s"<tt>]</span>' % line[lastpos:])
31
32 # Add paragraph with the remainder of the line
33 - if not (self.in_pre or self.in_li or self.in_dd or self.inhibit_p or
34 + if not (self.in_pre or self.inhibit_p or
35 self.formatter.in_p) and lastpos < len(line):
36 result.append(self.formatter.paragraph(1, css_class="line874"))
37 result.append(self.formatter.text(line[lastpos:]))
38 @@ -937,6 +929,7 @@
39 self.request.clock.start('compile_huge_and_ugly')
40 scan_re = re.compile(rules, re.UNICODE)
41 number_re = re.compile(self.ol_rule, re.UNICODE)
42 + bullet_re = re.compile("^\s+[*.]\s", re.UNICODE)
43 term_re = re.compile(self.dl_rule, re.UNICODE)
44 indent_re = re.compile("^\s*", re.UNICODE)
45 eol_re = re.compile(r'\r?\n', re.UNICODE)
46 @@ -1043,7 +1036,7 @@
47 # Check indent level
48 indent = indent_re.match(line)
49 indlen = len(indent.group(0))
50 - indtype = "ul"
51 + indtype = None
52 numtype = None
53 numstart = None
54 if indlen:
55 @@ -1058,6 +1051,8 @@
56 numstart = None
57
58 indtype = "ol"
59 + elif bullet_re.match(line):
60 + indtype = "ul"
61 else:
62 match = term_re.match(line)
63 if match:
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.