Skip to content

Commit b7f869d

Browse files
committed
use rst reference as default
1 parent a37c2f1 commit b7f869d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dargs/dargs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
INDENT = " " # doc is indented by four spaces
29-
RAW_ANCHOR = True # whether to use raw html anchors or RST ones
29+
RAW_ANCHOR = False # whether to use raw html anchors or RST ones
3030

3131

3232
_DUMMYHOOK = lambda a,x: None # for doing nothing in traversing
@@ -555,10 +555,10 @@ def make_rst_refid(name):
555555
def make_ref_pair(path, text=None, prefix=None):
556556
if not isinstance(path, str):
557557
path = '/'.join(path)
558-
url = f"`{path}`_" if not RAW_ANCHOR else f"#{path}"
558+
tgt = f"`{path}`_" if not RAW_ANCHOR else f"#{path}"
559559
ref = ("" if not prefix else f"{prefix}:") + path
560560
inline = f'`{ref}`_' if not text else f'|{ref}|_'
561-
target = f'.. _`{ref}`: {url}'
561+
target = f'.. _`{ref}`: {tgt}'
562562
if text:
563563
target = f'.. |{ref}| replace:: {text}\n' + target
564564
return inline, target

0 commit comments

Comments
 (0)