Skip to content

Commit

Permalink
Render :rc: values as literal text
Browse files Browse the repository at this point in the history
  • Loading branch information
lukelbd committed Sep 16, 2019
1 parent 296f53e commit 0b09e8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/sphinxext/custom_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def rc_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
ref = nodes.reference(rawtext, rendered, refuri=refuri)
node_list = [nodes.literal('', '', ref)]
if show_default and text in rc:
node_list.append(nodes.Text(f' = {rc[text]!r}'))
node_list.append(nodes.Text(' = '))
node_list.append(nodes.literal('', '', nodes.Text(repr(rc[text]))))
return node_list, []
return rc_role

Expand Down

0 comments on commit 0b09e8a

Please sign in to comment.