mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-07 03:55:26 +00:00
Compatibility for Sphinx<=4 and Sphinx>4
This commit is contained in:
parent
996adba3a0
commit
4088f251e3
@ -15,8 +15,13 @@ class ZundlerBuilder(StandaloneHTMLBuilder):
|
|||||||
name = 'zundler'
|
name = 'zundler'
|
||||||
epilog = ""
|
epilog = ""
|
||||||
|
|
||||||
def __init__(self, app, env):
|
def __init__(self, app, env=None):
|
||||||
super().__init__(app, env)
|
try:
|
||||||
|
super().__init__(app, env)
|
||||||
|
except TypeError:
|
||||||
|
# Sphinx<=4 expects only `app`
|
||||||
|
super().__init__(app)
|
||||||
|
|
||||||
self.epilog = (
|
self.epilog = (
|
||||||
'Your self-contained HTML file is now in %s.' %
|
'Your self-contained HTML file is now in %s.' %
|
||||||
relpath(self.app.original_outdir)
|
relpath(self.app.original_outdir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user