MCPcopy
hub / github.com/sphinx-doc/sphinx / process_link

Method process_link

sphinx/roles.py:152–165  ·  view source on GitHub ↗

Called after parsing title and target text, and creating the reference node (given in *refnode*). This method can alter the reference node and must return a new (or the same) ``(title, target)`` tuple.

(
        self,
        env: BuildEnvironment,
        refnode: Element,
        has_explicit_title: bool,
        title: str,
        target: str,
    )

Source from the content-addressed store, hash-verified

150 # methods that can be overwritten
151
152 def process_link(
153 self,
154 env: BuildEnvironment,
155 refnode: Element,
156 has_explicit_title: bool,
157 title: str,
158 target: str,
159 ) -> tuple[str, str]:
160 """Called after parsing title and target text, and creating the
161 reference node (given in *refnode*). This method can alter the
162 reference node and must return a new (or the same) ``(title, target)``
163 tuple.
164 """
165 return title, ws_re.sub(' ', target)
166
167 def result_nodes(
168 self,

Callers 2

create_xref_nodeMethod · 0.95
process_linkMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected