Exemplo n.º 1
0
 def generate( self, node, igen, *args, **kwargs ):
     try :
         style, innerHTML = node.text.split( u';', 1 )
     except :
         style, innerHTML = u'', node.text
     style, innerHTML = escape_htmlchars(style), escape_htmlchars(innerHTML)
     igen.puttext( self.template % (style, innerHTML) )
Exemplo n.º 2
0
 def generate(self, node, igen, *args, **kwargs):
     try:
         style, innerHTML = node.text.split(u';', 1)
     except:
         style, innerHTML = u'', node.text
     style, innerHTML = escape_htmlchars(style), escape_htmlchars(innerHTML)
     igen.puttext(self.template % (style, innerHTML))
Exemplo n.º 3
0
 def headpass1( self, node, igen ) :
     etparser = node.parser.etparser
     try :
         headings = node.getroot().filter( lambda n : isinstance(n, Heading) )
         headlist = []
         for h in headings :
             text = ''.join([
               n.dump(None)
               for n in h.filter( lambda n : isinstance(n, BASICTEXT) )
             ])
             text = escape_htmlchars(
                         text[:self.maxheadlen].lstrip(' \t') + \
                         ('...' if len(text) > self.maxheadlen else '')
                    )
             headlist.append( self.toca_tmpl % (h.level, '#'+text, text) )
         headlist = self.headlist_tmpl % '\n'.join( headlist )
         summary = self.summary_tmpl % self.summary
         html = self.tmpl % ( self.style, '\n'.join([summary, headlist]) )
     except :
         if node.parser.etparser.debug : raise
         html = 'Unable to generate the TOC, ' + \
                         'Wiki page not properly formed ! <br></br>'
     self.htmltext = html
Exemplo n.º 4
0
 def generate(self, node, igen, *args, **kwargs):
     igen.puttext(self.template % escape_htmlchars(node.text))
Exemplo n.º 5
0
 def generate(self, node, igen, *args, **kwargs):
     text = escape_htmlchars(node.text).replace(u',', u'<br/>')
     igen.puttext(self.template % text)
Exemplo n.º 6
0
 def generate(self, node, igen, *args, **kwargs):
     args = node.text.split(',')
     cont = escape_htmlchars(args and args.pop(0).strip() or '')
     title = escape_htmlchars(args and args.pop(0).strip() or '')
     html = self.template % (title, cont)
     igen.puttext(html)
Exemplo n.º 7
0
 def generate(self, node, igen, *args, **kwargs):
     text = escape_htmlchars(node.text.strip())
     igen.puttext(self.template % (text, text))
Exemplo n.º 8
0
 def generate( self, node, igen, *args, **kwargs ) :
     igen.puttext( self.template % escape_htmlchars( node.text ))
Exemplo n.º 9
0
 def generate( self, node, igen, *args, **kwargs ):
     text = escape_htmlchars( node.text ).replace(u',', u'<br/>')
     igen.puttext( self.template % text )
Exemplo n.º 10
0
 def generate( self, node, igen, *args, **kwargs ):
     args  = node.text.split(',')
     cont  = escape_htmlchars( args and args.pop(0).strip() or '' )
     title = escape_htmlchars( args and args.pop(0).strip() or '' )
     html  =  self.template % ( title, cont )
     igen.puttext( html )
Exemplo n.º 11
0
 def generate( self, node, igen, *args, **kwargs ):
     text = escape_htmlchars( node.text.strip() )
     igen.puttext( self.template % (text, text) )