comparison MoinMoin/formatter/text_html.py @ 1186:3172214eac96

Fixed some bugs, whitespaces at EOL, better i18n for SystemInfo
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Tue, 18 Jul 2006 15:36:02 +0200
parents 902c34d95085
children 277b97ba0700
comparison
equal deleted inserted replaced
982:541271bb8a56 1186:3172214eac96
386 result.append(self._close(inline)) 386 result.append(self._close(inline))
387 # Format with newline 387 # Format with newline
388 if newline: 388 if newline:
389 result.append(self._newline()) 389 result.append(self._newline())
390 result.append('</%s>' % (tag)) 390 result.append('</%s>' % (tag))
391 tagstr = ''.join(result) 391 tagstr = ''.join(result)
392 else: 392 else:
393 # Inline elements 393 # Inline elements
394 # Pull from stack, ignore order, that is not our problem. 394 # Pull from stack, ignore order, that is not our problem.
395 # The code that calls us should keep correct calling order. 395 # The code that calls us should keep correct calling order.
396 if tag in self._inlineStack: 396 if tag in self._inlineStack:
453 aid = 'bottom' 453 aid = 'bottom'
454 454
455 result = [] 455 result = []
456 result.append(self.anchordef(aid)) 456 result.append(self.anchordef(aid))
457 result.append(self._close('div', newline=newline)) 457 result.append(self._close('div', newline=newline))
458 return ''.join(result) 458 return ''.join(result)
459 459
460 def lang(self, on, lang_name): 460 def lang(self, on, lang_name):
461 """ Insert text with specific lang and direction. 461 """ Insert text with specific lang and direction.
462 462
463 Enclose within span tag if lang_name is different from 463 Enclose within span tag if lang_name is different from
824 Any text within this section will have spaces converted to 824 Any text within this section will have spaces converted to
825 non-break spaces. 825 non-break spaces.
826 """ 826 """
827 tag = 'tt' 827 tag = 'tt'
828 # Maybe we don't need this, because we have tt will be in inlineStack. 828 # Maybe we don't need this, because we have tt will be in inlineStack.
829 self._in_code = on 829 self._in_code = on
830 if on: 830 if on:
831 return self._open(tag, allowed_attrs=[], **kw) 831 return self._open(tag, allowed_attrs=[], **kw)
832 return self._close(tag) 832 return self._close(tag)
833 833
834 def small(self, on, **kw): 834 def small(self, on, **kw):
1301 # Close tbody, table, and then div 1301 # Close tbody, table, and then div
1302 result.append(self._close('tbody')) 1302 result.append(self._close('tbody'))
1303 result.append(self._close('table')) 1303 result.append(self._close('table'))
1304 result.append(self._close('div')) 1304 result.append(self._close('div'))
1305 1305
1306 return ''.join(result) 1306 return ''.join(result)
1307 1307
1308 def table_row(self, on, attrs=None, **kw): 1308 def table_row(self, on, attrs=None, **kw):
1309 tag = 'tr' 1309 tag = 'tr'
1310 if on: 1310 if on:
1311 if not attrs: 1311 if not attrs: