summaryrefslogtreecommitdiff
path: root/pygments/formatters/groff.py
diff options
context:
space:
mode:
authorJean Abou-Samra <jean@abou-samra.fr>2022-02-05 07:02:44 +0100
committerGitHub <noreply@github.com>2022-02-05 07:02:44 +0100
commitda799d14818ed538bf937684a19ce779ddde9446 (patch)
treecac1ded47f4c37b0400788c67bdf6eaf83b24e19 /pygments/formatters/groff.py
parentdbd7931f9d60966fbb80745db368ad773a8b7569 (diff)
downloadpygments-git-da799d14818ed538bf937684a19ce779ddde9446.tar.gz
Let Groff formatter inherit token styles correctly (#2024)
Diffstat (limited to 'pygments/formatters/groff.py')
-rw-r--r--pygments/formatters/groff.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pygments/formatters/groff.py b/pygments/formatters/groff.py
index 31a4f330..7d409baa 100644
--- a/pygments/formatters/groff.py
+++ b/pygments/formatters/groff.py
@@ -144,6 +144,8 @@ class GroffFormatter(Formatter):
self._write_lineno(outfile)
for ttype, value in tokensource:
+ while ttype not in self.styles:
+ ttype = ttype.parent
start, end = self.styles[ttype]
for line in value.splitlines(True):