mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3817: latex builder raises AttributeError
This commit is contained in:
parent
19e4462fd7
commit
0b945ce157
2
CHANGES
2
CHANGES
@ -37,6 +37,8 @@ Bugs fixed
|
||||
* #3788: smartquotes emits warnings for unsupported languages
|
||||
* #3807: docs do not say Latexmk is dependency on Windows for ``make latexpdf``
|
||||
* #3781: double hyphens in option directive are compiled as endashes
|
||||
* #3817: latex builder raises AttributeError
|
||||
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -87,7 +87,7 @@ class SphinxTransformer(Transformer):
|
||||
def apply_transforms(self):
|
||||
# type: () -> None
|
||||
if isinstance(self.document, nodes.document):
|
||||
if hasattr(self.document.settings, 'env') and self.env:
|
||||
if not hasattr(self.document.settings, 'env') and self.env:
|
||||
self.document.settings.env = self.env
|
||||
|
||||
Transformer.apply_transforms(self)
|
||||
|
Loading…
Reference in New Issue
Block a user