mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #9401 from tk0miya/9387_custom_visitors_for_xml
Fix #9387: xml: XML Builder ignores custom visitors
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -94,6 +94,7 @@ Bugs fixed
|
||||
* #9306: Linkcheck reports broken link when remote server closes the connection
|
||||
on HEAD request
|
||||
* #9280: py domain: "exceptions" module is not displayed
|
||||
* #9387: xml: XML Builder ignores custom visitors
|
||||
* #9224: ``:param:`` and ``:type:`` fields does not support a type containing
|
||||
whitespace (ex. ``Dict[str, str]``)
|
||||
* #8945: when transforming typed fields, call the specified role instead of
|
||||
|
||||
@@ -19,7 +19,9 @@ class XMLWriter(BaseXMLWriter):
|
||||
def __init__(self, builder: Builder) -> None:
|
||||
super().__init__()
|
||||
self.builder = builder
|
||||
self.translator_class = self.builder.get_translator_class()
|
||||
|
||||
# A lambda function to generate translator lazily
|
||||
self.translator_class = lambda document: self.builder.create_translator(document)
|
||||
|
||||
def translate(self, *args: Any, **kwargs: Any) -> None:
|
||||
self.document.settings.newlines = \
|
||||
|
||||
Reference in New Issue
Block a user