Debian Codegraph @

debian/patches/0003-Disable-lexer-examples-in-documentation.patch

raw
1 From: Stefano Rivera <[email protected]>
2 Date: Sun, 21 Jan 2024 10:21:07 -0400
3 Subject: Disable lexer examples in documentation
4
5 We strip tests/examplefiles from the source for licensing reasons.
6 Disable the code that attempts to include these in documentation.
7 ---
8 pygments/sphinxext.py | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11 diff --git a/pygments/sphinxext.py b/pygments/sphinxext.py
12 index c215399..2400b2c 100644
13 --- a/pygments/sphinxext.py
14 +++ b/pygments/sphinxext.py
15 @@ -167,7 +167,7 @@ class PygmentsDoc(Directive):
16 if isinstance(docstring, bytes):
17 docstring = docstring.decode('utf8')
18
19 - example_file = getattr(cls, '_example', None)
20 + example_file = None # getattr(cls, '_example', None)
21 if example_file:
22 p = pathlib.Path(inspect.getabsfile(pygments)).parent.parent /\
23 'tests' / 'examplefiles' / example_file