diff options
author | Matthäus G. Chajdas <dev@anteru.net> | 2022-01-06 12:01:09 +0100 |
---|---|---|
committer | Matthäus G. Chajdas <dev@anteru.net> | 2022-01-06 12:02:42 +0100 |
commit | 8fdd6b9879a6c34b908fa03a6ff15f764192a54e (patch) | |
tree | 1f2b5ffe7d87bed28fbec3998e95b28571e8d1f0 /pygments/formatters/terminal256.py | |
parent | 05d1867453b93540344989e14cd2de27ccbe53de (diff) | |
download | pygments-git-8fdd6b9879a6c34b908fa03a6ff15f764192a54e.tar.gz |
Fix #1986.
Some formatters did not backtrack to parent token types correctly when
trying to find a matching style.
Diffstat (limited to 'pygments/formatters/terminal256.py')
-rw-r--r-- | pygments/formatters/terminal256.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/formatters/terminal256.py b/pygments/formatters/terminal256.py index 0b6bb161..be6f890f 100644 --- a/pygments/formatters/terminal256.py +++ b/pygments/formatters/terminal256.py @@ -279,7 +279,7 @@ class Terminal256Formatter(Formatter): except KeyError: # ottype = ttype - ttype = ttype[:-1] + ttype = ttype.parent # outfile.write( '!' + str(ottype) + '->' + str(ttype) + '!' ) if not_found: |