mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +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'
|
||||
epilog = ""
|
||||
|
||||
def __init__(self, app, env):
|
||||
super().__init__(app, env)
|
||||
def __init__(self, app, env=None):
|
||||
try:
|
||||
super().__init__(app, env)
|
||||
except TypeError:
|
||||
# Sphinx<=4 expects only `app`
|
||||
super().__init__(app)
|
||||
|
||||
self.epilog = (
|
||||
'Your self-contained HTML file is now in %s.' %
|
||||
relpath(self.app.original_outdir)
|
||||
|
Loading…
x
Reference in New Issue
Block a user