Attachment 'base.py.diff'
Download 1 --- MoinMoin/formatter/base.py.orig 2005-11-18 14:16:35.000000000 -0500
2 +++ MoinMoin/formatter/base.py 2006-01-12 14:32:21.000000000 -0500
3 @@ -135,23 +135,18 @@
4 def line_anchordef(self, lineno):
5 return ""
6
7 - def anchorlink(self, on, name='', id=None):
8 + def anchorlink(self, on, name='', **kw):
9 return ""
10
11 def line_anchorlink(self, on, lineno=0):
12 return ""
13
14 - def image(self, **kw):
15 + def image(self, src=None, **kw):
16 """ Take HTML <IMG> tag attributes in `attr`.
17
18 Attribute names have to be lowercase!
19 """
20 - attrstr = u''
21 - for attr, value in kw.items():
22 - if attr=='html_class':
23 - attr='class'
24 - attrstr = attrstr + u' %s="%s"' % (attr, wikiutil.escape(value))
25 - return u'<img%s>' % attrstr
26 + return '[Image:%s]' % attrstr
27
28 def smiley(self, text):
29 return text
30 @@ -161,7 +156,7 @@
31
32 # Text and Text Attributes ###########################################
33
34 - def text(self, text):
35 + def text(self, text, **kw):
36 if not self._highlight_re:
37 return self._text(text)
38
39 @@ -185,37 +180,37 @@
40 def _text(self, text):
41 raise NotImplementedError
42
43 - def strong(self, on):
44 + def strong(self, on, **kw):
45 raise NotImplementedError
46
47 - def emphasis(self, on):
48 + def emphasis(self, on, **kw):
49 raise NotImplementedError
50
51 - def underline(self, on):
52 + def underline(self, on, **kw):
53 raise NotImplementedError
54
55 - def highlight(self, on):
56 + def highlight(self, on, **kw):
57 raise NotImplementedError
58
59 - def sup(self, on):
60 + def sup(self, on, **kw):
61 raise NotImplementedError
62
63 - def sub(self, on):
64 + def sub(self, on, **kw):
65 raise NotImplementedError
66
67 - def strike(self, on):
68 + def strike(self, on, **kw):
69 raise NotImplementedError
70
71 def code(self, on, **kw):
72 raise NotImplementedError
73
74 - def preformatted(self, on):
75 + def preformatted(self, on, **kw):
76 self.in_pre = on != 0
77
78 - def small(self, on):
79 + def small(self, on, **kw):
80 raise NotImplementedError
81
82 - def big(self, on):
83 + def big(self, on, **kw):
84 raise NotImplementedError
85
86 # special markup for syntax highlighting #############################
87 @@ -234,10 +229,10 @@
88 def linebreak(self, preformatted=1):
89 raise NotImplementedError
90
91 - def paragraph(self, on):
92 + def paragraph(self, on, **kw):
93 self.in_p = (on != 0)
94
95 - def rule(self, size=0):
96 + def rule(self, size=0, **kw):
97 raise NotImplementedError
98
99 def icon(self, type):
100 @@ -245,22 +240,22 @@
101
102 # Lists ##############################################################
103
104 - def number_list(self, on, type=None, start=None):
105 + def number_list(self, on, type=None, start=None, **kw):
106 raise NotImplementedError
107
108 - def bullet_list(self, on):
109 + def bullet_list(self, on, **kw):
110 raise NotImplementedError
111
112 def listitem(self, on, **kw):
113 raise NotImplementedError
114
115 - def definition_list(self, on):
116 + def definition_list(self, on, **kw):
117 raise NotImplementedError
118
119 - def definition_term(self, on, compact=0):
120 + def definition_term(self, on, compact=0, **kw):
121 raise NotImplementedError
122
123 - def definition_desc(self, on):
124 + def definition_desc(self, on, **kw):
125 raise NotImplementedError
126
127 def heading(self, on, depth, **kw):
128 @@ -268,13 +263,13 @@
129
130 # Tables #############################################################
131
132 - def table(self, on, attrs={}):
133 + def table(self, on, attrs={}, **kw):
134 raise NotImplementedError
135
136 - def table_row(self, on, attrs={}):
137 + def table_row(self, on, attrs={}, **kw):
138 raise NotImplementedError
139
140 - def table_cell(self, on, attrs={}):
141 + def table_cell(self, on, attrs={}, **kw):
142 raise NotImplementedError
143
144 # Dynamic stuff / Plugins ############################################
145 @@ -342,7 +337,7 @@
146
147 return self.text(f.getvalue())
148
149 - def escapedText(self, on):
150 + def escapedText(self, on, **kw):
151 """ This allows emitting text as-is, anything special will
152 be escaped (at least in HTML, some text output format
153 would possibly do nothing here)
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.