def pq_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
+ text = utils.unescape(text)
+
reader = get_reader()
if "(" in text:
func, noise = text.split("(", 1)
noise = "(" + noise
+
else:
func = text
noise = ""
prb = inliner.problematic(rawtext, rawtext, msg)
return [prb], [msg]
- text = utils.unescape(text)
+ # For a function f(), include the () in the signature for consistency
+ # with a normal `thing()`
+ if noise == "()":
+ func, noise = func + noise, ""
the_nodes = []
the_nodes.append(nodes.reference(func, func, refuri=url))