コード例 #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
ファイル: GitSearchItem.py プロジェクト: pombredanne/CoCaBu
    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"
コード例 #6
0
 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
ファイル: objcio-epub.py プロジェクト: objcio/pygments
 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)
コード例 #10
0
 def __init__(self, identifier):
     HtmlFormatter.__init__(self, linenos="table")
     self.identifier = identifier
コード例 #11
0
ファイル: c_coverage_report.py プロジェクト: 7924102/numpy
 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
ファイル: lexer.py プロジェクト: gobburms/catonmat.net
 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')