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