NakedHTMLFormatter Parent Wrap

Signed-off-by: Darren Nathanael <github@darrennathanael.com>
This commit is contained in:
Darren Nathanael 2024-12-04 03:11:26 +07:00
parent ef1b2caeda
commit 2960b1d68a
No known key found for this signature in database
GPG key ID: 5D1D163C5A189F40

View file

@ -112,9 +112,11 @@ class NakedHtmlFormatter(HtmlFormatter):
"""Pygments HTML formatter with no further HTML tags.""" """Pygments HTML formatter with no further HTML tags."""
def wrap(self, source, outfile): def wrap(self, source, outfile):
return self._wrap_code(source) # Call parent's wrap method with both parameters
return super().wrap(self._wrap_code(source), outfile)
def _wrap_code(self, source): def _wrap_code(self, source):
"""Process and yield the source code chunks."""
yield from source yield from source