Attachment 'dom_xml.py.diff'
Download 1 --- MoinMoin/formatter/dom_xml.py.orig 2005-11-18 14:16:35.000000000 -0500
2 +++ MoinMoin/formatter/dom_xml.py 2006-01-12 14:47:30.000000000 -0500
3 @@ -253,7 +253,7 @@
4 kw['type'] = 'inline'
5 return self._add_tag('attachment', **kw)
6
7 - def rule(self, size=0):
8 + def rule(self, size=0, **kw):
9 return self._add_tag('hr', size=str(size))
10
11 def icon(self, type):
12 @@ -262,41 +262,41 @@
13 def smiley(self, type):
14 return self._add_tag('smiley', type=type)
15
16 - def strong(self, on):
17 + def strong(self, on, **kw):
18 return self._set_tag('b', on)
19
20 - def emphasis(self, on):
21 + def emphasis(self, on, **kw):
22 return self._set_tag('em', on)
23
24 - def highlight(self, on):
25 + def highlight(self, on, **kw):
26 return self._set_tag('highlight', on)
27
28 - def number_list(self, on, type=None, start=None):
29 + def number_list(self, on, type=None, start=None, **k2):
30 return self._set_tag('ol', on, type=type, start=start)
31
32 - def bullet_list(self, on):
33 + def bullet_list(self, on, **kw):
34 return self._set_tag('ul', on)
35
36 def listitem(self, on, **kw):
37 return self._set_tag('li', on)
38
39 - def sup(self, on):
40 + def sup(self, on, **kw):
41 return self._set_tag('sup', on)
42
43 - def sub(self, on):
44 + def sub(self, on, **kw):
45 return self._set_tag('sub', on)
46
47 - def strike(self, on):
48 + def strike(self, on, **kw):
49 return self._set_tag('strike', on)
50
51 def code(self, on, **kw):
52 return self._set_tag('code', on)
53
54 - def preformatted(self, on):
55 + def preformatted(self, on, **kw):
56 self.in_pre = on != 0
57 return self._set_tag('pre', on)
58
59 - def paragraph(self, on):
60 + def paragraph(self, on, **kw):
61 FormatterBase.paragraph(self, on)
62 return self._set_tag('p', on)
63
64 @@ -315,31 +315,28 @@
65 result[str(name)] = value
66 return result
67
68 - def table(self, on, attrs={}):
69 + def table(self, on, attrs={}, **kw):
70 return self._set_tag('table', on, **self._check_attrs(attrs))
71
72 - def table_row(self, on, attrs={}):
73 + def table_row(self, on, attrs={}, **kw):
74 return self._set_tag('tr', on, **self._check_attrs(attrs))
75
76 - def table_cell(self, on, attrs={}):
77 + def table_cell(self, on, attrs={}, **kw):
78 return self._set_tag('td', on, **self._check_attrs(attrs))
79
80 def anchordef(self, name):
81 return self._add_tag('anchor', name=name)
82
83 - def anchorlink(self, on, name, id=None):
84 - kw = {}
85 - if id:
86 - kw['id'] = str(id)
87 + def anchorlink(self, on, name, **kw):
88 return self.url(on, "#" + name, **kw)
89
90 - def underline(self, on):
91 + def underline(self, on, **kw):
92 return self._set_tag('u', on)
93
94 - def definition_list(self, on):
95 + def definition_list(self, on, **kw):
96 return self._set_tag('dl', on)
97
98 - def definition_term(self, on, compact=0):
99 + def definition_term(self, on, compact=0, **kw):
100 # XXX may be not correct
101 # self._langAttr() missing
102 if compact and on:
103 @@ -347,24 +344,26 @@
104 else:
105 return self._set_tag('dt', on)
106
107 - def definition_desc(self, on):
108 + def definition_desc(self, on, **kw):
109 # self._langAttr() missing
110 return self._set_tag('dd', on)
111
112 - def image(self, **kw):
113 + def image(self, src=None, **kw):
114 """ Take HTML <IMG> tag attributes in `attr`.
115
116 Attribute names have to be lowercase!
117 """
118 + if src:
119 + kw['src']=src
120 return self._add_tag('img', **kw)
121
122 - def escapedText(self, text):
123 + def escapedText(self, text, **kw):
124 return wikiutil.escape(text)
125
126 - def small(self, on):
127 + def small(self, on, **kw):
128 return self._set_tag('small', on)
129
130 - def big(self, on):
131 + def big(self, on, **kw):
132 return self._set_tag('big', on)
133
134 def code_area(self, on, code_id, code_type='code', show=0, start=-1, step=-1):
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.