MCPcopy Create free account
hub / github.com/ipython/ipython / LineMagicRole

Class LineMagicRole

docs/sphinxext/magics.py:16–24  ·  view source on GitHub ↗

Cross reference role displayed with a % prefix

Source from the content-addressed store, hash-verified

14 return m.group(0)
15
16class LineMagicRole(XRefRole):
17 """Cross reference role displayed with a % prefix"""
18 prefix = "%"
19
20 def process_link(self, env, refnode, has_explicit_title, title, target):
21 if not has_explicit_title:
22 title = self.prefix + title.lstrip("%")
23 target = target.lstrip("%")
24 return title, target
25
26def parse_cell_magic(env, sig, signode):
27 m = name_re.match(sig)

Callers 1

setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected