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