[Moin-devel] CVS: MoinMoin/formatter text_html.py,1.34,1.35
J?rgen Hermann
jhermann at users.sourceforge.net
Wed Jan 30 15:46:08 EST 2002
Update of /cvsroot/moin/MoinMoin/formatter
In directory usw-pr-cvs1:/tmp/cvs-serv8916/formatter
Modified Files:
text_html.py
Log Message:
Replace spaces by hardspaces in inline code sections
Index: text_html.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/formatter/text_html.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** text_html.py 2002/01/24 23:10:47 1.34
--- text_html.py 2002/01/30 23:45:42 1.35
***************
*** 43,46 ****
--- 43,47 ----
apply(FormatterBase.__init__, (self,), kw)
self._in_li = 0
+ self._in_code = 0
self._hd_counters = []
self._base_depth = 0
***************
*** 77,80 ****
--- 78,83 ----
def text(self, text):
+ if self._in_code:
+ return string.replace(cgi.escape(text), ' ', self.hardspace)
return cgi.escape(text)
***************
*** 114,117 ****
--- 117,121 ----
def code(self, on):
+ self._in_code = on
return ['<tt class="wiki">', '</tt>'][not on]
More information about the Moin-devel
mailing list