예제 #1
0
파일: highlighting.py 프로젝트: jahir/klaus
 def __init__(self, language, ctags, **kwargs):
     HtmlFormatter.__init__(self, linenos='table', lineanchors='L',
                            linespans='L', anchorlinenos=True, **kwargs)
     self.language = language
     if ctags:
         # Use Pygments' ctags system but provide our own CTags instance
         self.tagsfile = True  # some trueish object
         self._ctags = ctags
예제 #2
0
파일: renderer.py 프로젝트: hugsy/codebro
 def __init__(self, **options):
     """
     
     """
     HtmlFormatter.__init__(self, **options)
     self.project = options['codebro_project']
     self.is_xrefed = False
     self.file = None
     self.functions = []
     self.func_idx = 0
예제 #3
0
 def __init__(self, language, ctags, **kwargs):
     HtmlFormatter.__init__(self,
                            linenos='table',
                            lineanchors='L',
                            linespans='L',
                            anchorlinenos=True,
                            **kwargs)
     self.language = language
     if ctags:
         # Use Pygments' ctags system but provide our own CTags instance
         self.tagsfile = True  # some trueish object
         self._ctags = ctags
예제 #4
0
    def __init__(self, **options):
        HtmlFormatter.__init__(self, **options)
        self.matched_terms = options[
            "matched_terms"] if "matched_terms" in options else []
        self.matched_terms = [
            token.lower() for term in self.matched_terms
            for token in term.split(".")
        ]

        h_terms = []
        for term in self.matched_terms:

            if "." in term:
                for token in term.split("."):
                    h_terms.append(token)
            else:
                h_terms.append(term)

        self.matched_terms = h_terms
예제 #5
0
    def __init__(self, **options):
        HtmlFormatter.__init__(self, **options)

        self.ctagsfile = options.get("ctagsfile", None)

        if self.ctagsfile is not None:

            # ctags --fields='+n' --output-format=json -f ctagsfile
            with open(self.ctagsfile, 'r') as inctags:
                tmp = inctags.readlines()

            tags = {}
            for tag in tmp:
                tag = json.loads(tag)
                if tag["_type"] == "tag":
                    tags[tag["name"]] = tag
                    del tags[tag["name"]]["name"]

            self._ctags = tags
            self.tagurlformat = "%(fname)s%(fext)s.html"
            self.tagsfile = "placeholder"
 def __init__(self, **options):
     HtmlFormatter.__init__(self, **options)
     self.relativeBaseDir = options.get("relativeBaseDir", "")
예제 #7
0
파일: objcio.py 프로젝트: objcio/pygments
 def __init__(self, **options):
     HtmlFormatter.__init__(self, **options)
예제 #8
0
 def __init__(self, **options):
     HtmlFormatter.__init__(self, **options)
     self.inputIndent = int(options.get('input-indent', '4'))
     self.indent = float(options.get('indent', '3'))
     self.indentUnit = options.get('indent-unit', 'ch')
예제 #9
0
파일: hydehtml.py 프로젝트: skroll/hyde
 def __init__(self, **options):
     HtmlFormatter.__init__(self, **options)
     self.wrap_pre = get_bool_opt(options, 'wrap_pre', False)
     self.wrap_code = get_bool_opt(options, 'wrap_code', False)
 def __init__(self, identifier):
     HtmlFormatter.__init__(self, linenos="table")
     self.identifier = identifier
예제 #11
0
 def __init__(self, lines, **kwargs):
     HtmlFormatter.__init__(self, **kwargs)
     self.lines = lines
예제 #12
0
 def __init__(self, *args, **kwargs):
     BaseModuleInfo.__init__(self, kwargs['module'])
     del kwargs['module']
     HtmlFormatter.__init__(self, *args, **kwargs)
     self.curlineno = None
예제 #13
0
 def __init__(self, *args, **kwargs):
     BaseModuleInfo.__init__(self, kwargs['module'])
     del kwargs['module']
     HtmlFormatter.__init__(self, *args, **kwargs)
     self.curlineno = None
예제 #14
0
파일: highlighter.py 프로젝트: glguy/hpaste
 def __init__(self, **options):
     HtmlFormatter.__init__(self, **options)
     self.pasteid = options.get('pasteid',0)
예제 #15
0
파일: highlight.py 프로젝트: UfSoft/pastie
 def __init__(self, **options):
     HtmlFormatter.__init__(self, **options)
     self.lineanchorlinks = options.get('lineanchorlinks', False)
예제 #16
0
 def __init__(self, identifier):
     HtmlFormatter.__init__(self, linenos="table")
     self.identifier = identifier
예제 #17
0
파일: utils.py 프로젝트: posativ/klaus
 def __init__(self, linenos):
     HtmlFormatter.__init__(self, linenos=linenos, lineanchors='L',
                            anchorlinenos=True)
예제 #18
0
 def __init__(self):
     HtmlFormatter.__init__(self, linenos="inline")
예제 #19
0
 def __init__(self, lines, **kwargs):
     HtmlFormatter.__init__(self, **kwargs)
     self.lines = lines
예제 #20
0
 def __init__(self, other):
     self._xyzzy_other = other
     HtmlFormatter.__init__(self)
예제 #21
0
 def __init__(self):
     HtmlFormatter.__init__(self, linenos="inline")
예제 #22
0
 def __init__(self, **options):
     #E Invoke the HtmlFormatter constructor with the same options
     HtmlFormatter.__init__(self, **options)
예제 #23
0
파일: html_report.py 프로젝트: dholm/gcovr
 def __init__(self, covdata, **options):
     HtmlFormatter.__init__(self, **options)
     self.covdata = covdata
예제 #24
0
파일: utils.py 프로젝트: johnhsieh/klaus
 def __init__(self):
     HtmlFormatter.__init__(self,
                            linenos='table',
                            lineanchors='L',
                            anchorlinenos=True)
예제 #25
0
파일: coloring.py 프로젝트: mchaput/bookish
 def __init__(self, hl_lines=None):
     HtmlFormatter.__init__(self, hl_lines=hl_lines or [])
예제 #26
0
파일: utils.py 프로젝트: ewdurbin/klaus
 def __init__(self):
     HtmlFormatter.__init__(self, linenos='table', lineanchors='L',
                            anchorlinenos=True)
예제 #27
0
 def __init__(self, **options):
     HtmlFormatter.__init__(self, **options)
     self.lineidprefix = options.get('lineidprefix', 'line')