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/irc.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/irc.py')
-rw-r--r-- | pygments/formatters/irc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/formatters/irc.py b/pygments/formatters/irc.py index 22928f98..d8da7a39 100644 --- a/pygments/formatters/irc.py +++ b/pygments/formatters/irc.py @@ -140,7 +140,7 @@ class IRCFormatter(Formatter): value = value[:-1] color = self.colorscheme.get(ttype) while color is None: - ttype = ttype[:-1] + ttype = ttype.parent color = self.colorscheme.get(ttype) if color: color = color[self.darkbg] |