(self, src, lang, hl_lines=[], inline=False, no_wrap=False, code_wrap=False)
return ''.join(self.html)
Syntax Highlight.
Syntax Highlight.
Syntax Highlight .
def syntax_highlight(self, src, lang, hl_lines=[], inline=False, no_wrap=False, code_wrap=False):
        """Syntax Highlight."""

        self.set_view(src, 'text' if not lang else lang)
        if NEW_SCHEMES:
            self.defaults = self.view.style()
            self.fground = self.defaults.get('foreground', '#000000')
            self.bground = self.defaults.get('background', '#FFFFFF')
        self.inline = inline
        self.hl_lines = hl_lines
        self.no_wrap = no_wrap
        self.code_wrap = code_wrap
        self.setup()
        self.html = []
        self.write_body()
        return ''.join(self.html)
def syntax_highlight ( self , src , lang , hl_lines = [ ] , inline = False , no_wrap = False , code_wrap = False ) : self . set_view ( src , 'text' if not lang else lang ) if NEW_SCHEMES : self . defaults = self . view . style ( ) self . fground = self . defaults . get ( 'foreground' , '#000000' ) self . bground = self . defaults . get ( 'background' , '#FFFFFF' ) self . inline = inline self . hl_lines = hl_lines self . no_wrap = no_wrap self . code_wrap = code_wrap self . setup ( ) self . html = [ ] self . write_body ( ) return '' . join ( self . html )