diff MoinMoin/formatter/text_html.py @ 1534:8a53c6676240

Added no_magic to text_html formatter to disable tag autoclosing. (Thanks to Radomir Dopieralski.)
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Thu, 07 Sep 2006 16:59:39 +0200
parents c3fcddbf0c51
children 79679aa664a3
line wrap: on
line diff
--- a/MoinMoin/formatter/text_html.py	Tue Sep 05 15:34:55 2006 +0200
+++ b/MoinMoin/formatter/text_html.py	Thu Sep 07 16:59:39 2006 +0200
@@ -201,6 +201,7 @@
         self._is_included = kw.get('is_included', False)
         self.request = request
         self.cfg = request.cfg
+        self.no_magic = kw.get('no_magic', False) # disabled tag auto closing
 
         if not hasattr(request, '_fmt_hd_counters'):
             request._fmt_hd_counters = []
@@ -377,7 +378,7 @@
         @rtype: string
         @return: closing tag as a string
         """
-        if tag in _self_closing_tags or tag in _auto_closing_tags:
+        if tag in _self_closing_tags or (tag in _auto_closing_tags and not self.no_magic):
             # This tag was already closed
             tagstr = ''
         elif tag in _blocks: