Attachment 'html_out.diff'
Download 1 diff -r 26da1af34568 MoinMoin/converter2/html_out.py
2 --- a/MoinMoin/converter2/html_out.py Mon Jun 28 15:44:25 2010 +0200
3 +++ b/MoinMoin/converter2/html_out.py Wed Jun 30 15:23:29 2010 +0200
4 @@ -229,6 +229,16 @@
5
6 if generate:
7 if generate == 'ordered':
8 + style = attrib.get('list-style-type')
9 + if style:
10 + if style == 'upper-alpha':
11 + attrib_new[html('type')] = 'A'
12 + elif style == 'upper-roman':
13 + attrib_new[html('type')] = 'I'
14 + elif style == 'lower-roman':
15 + attrib_new[html('type')] = 'i'
16 + elif style == 'lower-alpha':
17 + attrib_new[html('type')] = 'a'
18 ret = self.new(html.ol, attrib_new)
19 elif generate == 'unordered':
20 ret = self.new(html.ul, attrib_new)
21 @@ -324,7 +334,32 @@
22 return self.new(html.hr)
23
24 def visit_moinpage_span(self, elem):
25 - # TODO
26 + # TODO : Fix bug if a span has multiple attributes
27 + # Check for the attributes of span
28 + attrib = Attributes(elem)
29 + # Check for the baseline-shift (subscript or superscript)
30 + generate = attrib.get('baseline-shift')
31 + if generate:
32 + if generate == 'sub':
33 + return self.new_copy(html.sub, elem)
34 + elif generate == 'super':
35 + return self.new_copy(html.sup, elem)
36 + generate = attrib.get('text-decoration')
37 + if generate:
38 + if generate == 'underline':
39 + return self.new_copy(html.ins, elem)
40 + elif generate == 'line-through':
41 + return self.new_copy(html('del'), elem)
42 + generate = attrib.get('font-size')
43 + if generate:
44 + if generate == '85%':
45 + return self.new_copy(html.small, elem)
46 + elif generate == '120%':
47 + return self.new_copy(html.big, elem)
48 + generate = attrib.get('html-element')
49 + if generate:
50 + return self.new_copy(html(generate), elem)
51 + # If no any attributes is handled by our converter, just return span
52 return self.new_copy(html.span, elem)
53
54 def visit_moinpage_strong(self, elem):
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.