diff options
author | Cyker Way <cykerway@gmail.com> | 2021-05-02 14:48:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 08:48:48 +0200 |
commit | 30cfa26201a27dee1f8e6b0d600cad1138e64507 (patch) | |
tree | d3ef5f04378640daf80e9df76c0b41242d611a91 /pygments/formatters | |
parent | ac40a660ddd9d74ff52721ddd3952973180aa1d2 (diff) | |
download | pygments-git-30cfa26201a27dee1f8e6b0d600cad1138e64507.tar.gz |
encode `str` into `bytes` for `_lookup_ctag` argument; (#1724)
check source code of `python-ctags` and `python-ctags3` to see what
argument type is expected (answer: `char *`);
guess this is python 2 legacy; but now it should work in python 3;
Diffstat (limited to 'pygments/formatters')
-rw-r--r-- | pygments/formatters/html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index f755a40c..3029c1cc 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -890,7 +890,7 @@ class HtmlFormatter(Formatter): def _lookup_ctag(self, token): entry = ctags.TagEntry() - if self._ctags.find(entry, token, 0): + if self._ctags.find(entry, token.encode(), 0): return entry['file'], entry['lineNumber'] else: return None, None |