Beispiel #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) )
Beispiel #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))
Beispiel #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
Beispiel #4
0
 def generate(self, node, igen, *args, **kwargs):
     igen.puttext(self.template % escape_htmlchars(node.text))
Beispiel #5
0
 def generate(self, node, igen, *args, **kwargs):
     text = escape_htmlchars(node.text).replace(u',', u'<br/>')
     igen.puttext(self.template % text)
Beispiel #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)
Beispiel #7
0
 def generate(self, node, igen, *args, **kwargs):
     text = escape_htmlchars(node.text.strip())
     igen.puttext(self.template % (text, text))
Beispiel #8
0
 def generate( self, node, igen, *args, **kwargs ) :
     igen.puttext( self.template % escape_htmlchars( node.text ))
Beispiel #9
0
 def generate( self, node, igen, *args, **kwargs ):
     text = escape_htmlchars( node.text ).replace(u',', u'<br/>')
     igen.puttext( self.template % text )
Beispiel #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 )
Beispiel #11
0
 def generate( self, node, igen, *args, **kwargs ):
     text = escape_htmlchars( node.text.strip() )
     igen.puttext( self.template % (text, text) )