Permalink
Browse files

fixes for <syntax block=yes> case

  • Loading branch information...
1 parent b8d024a commit b2aa6a688b78f0ba088e53c46ed08fb605033cb2 Cliff Wells committed Apr 26, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 nginx-wiki.rules
View
13 nginx-wiki.rules
@@ -75,8 +75,8 @@ collapsible = "wikitable mw-collapsible mw-collapsed"
sanitize = True
collapse = True
strip = True
- _isblock = elem.get ('block') == 'yes'
- format = "{{ {0} }}" if _isblock else None
+ # _isblock = elem.get ('block') == 'yes'
+ # format = "{{ {0} }}" if _isblock else None
_prev = elem.getprevious ().tag if elem.getprevious () is not None else elem.getparent ().tag
_name = "'''{0}''' ".format (elem.xpath ('ancestor::directive')[0].get ('name'))
_tag = elem.tag.capitalize ().replace ('-', ' ')
@@ -85,8 +85,10 @@ collapsible = "wikitable mw-collapsible mw-collapsed"
sanitize = True
collapse = True
strip = True
+ _isblock = elem.get ('block') == 'yes'
+ _block = "{ ... }" if _isblock else ""
_next = elem.getnext ().tag if elem.getnext() is not None else ""
- suffix = "" if _next == elem.tag else "</td></tr>"
+ suffix = _block if _next == elem.tag else "{0}</td></tr>".format (_block)
~ /syntax(\[\d+\])?$
start:
@@ -101,8 +103,11 @@ collapsible = "wikitable mw-collapsible mw-collapsed"
sanitize = True
collapse = True
strip = True
+ _isblock = elem.get ('block') == 'yes'
+ _block = "{ ... }" if _isblock else ""
_next = elem.getnext ().tag if elem.getnext() is not None else ""
- suffix = "" if _next == elem.tag else "</td></tr>"
+ suffix = _block if _next == elem.tag else "{0}</td></tr>".format (_block)
+
#
# context

0 comments on commit b2aa6a6

Please sign in to comment.