Also hyperlink :term:

This commit is contained in:
Kovid Goyal
2022-08-20 15:40:39 +05:30
parent 31f763282f
commit 3b77f3b4bc
3 changed files with 5 additions and 4 deletions

View File

@@ -133,14 +133,13 @@ def code(x: str) -> str:
def text_and_target(x: str) -> Tuple[str, str]:
parts = x.split('<')
parts = x.split('<', 1)
return parts[0].strip(), parts[-1].rstrip('>')
@role
def term(x: str) -> str:
t, q = text_and_target(x)
return italic(t)
return ref_hyperlink(x, 'term-')
@role