Support ID links.
This commit is contained in:
parent
8295154a96
commit
2c6d54d9ed
@ -147,7 +147,10 @@ def render_text_tokens(tokens, acc):
|
||||
acc.append('{}</span> '.format(chunk))
|
||||
elif isinstance(chunk, Link):
|
||||
# @TODO: URLEscape
|
||||
acc.append('<a href="{}">{}</a>'.format(chunk.value, chunk.description))
|
||||
link_target = chunk.value
|
||||
if link_target.startswith('id:'):
|
||||
link_target = './' + link_target[3:] + '.node.html'
|
||||
acc.append('<a href="{}">{}</a>'.format(link_target, chunk.description))
|
||||
else:
|
||||
raise NotImplementedError('TextToken: {}'.format(chunk))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user