Lines Matching +full:set +full:- +full:content
2 Sphinx cross-version compatibility goop
48 ) -> None:
53 # necessary so that the child nodes get the right source/line set
61 directive.content,
67 with switch_source_input(directive.state, directive.content):
69 directive.state, directive.content, content_node
80 # using the garden-variety lib-provided classes with no trickery.
83 def _compat_make_xref( # pylint: disable=unused-argument
93 ) -> Node:
98 and formatting cross-references, so we need to perform this magick
102 This workaround isn't brick-for-brick compatible with modern Sphinx
106 It's no worse than what pre-Sphinx 4.1.0 does, so... oh well!
109 # Yes, this function is gross. Pre-4.1 support is a miracle.
110 # pylint: disable=too-many-locals
115 return contnode or innernode(target, target) # type: ignore[call-arg]
117 # Get the role instance, but don't *execute it* - we lack the
143 classes = ["xref", domain, f"{domain}-{rolename}"]
209 def before_content(self) -> None:
210 # Work around a sphinx bug and parse the content ourselves.
211 self._temp_content = self.content
218 self.content, self.content_offset, self._temp_node
220 # Sphinx will try to parse the content block itself,
222 self.content = StringList()
225 def transform_content(self, content_node: addnodes.desc_content) -> None:
226 # Sphinx workaround: Inject our parsed content and restore state.
229 self.content = self._temp_content