Add the :del: text role
It will be displayed as a `<del>` tag in HTML.
This commit is contained in:
parent
c53ba939c6
commit
434a0062f3
@ -10,9 +10,14 @@ def superscript_role(name, rawtext, text, lineno, inliner, options=None, content
|
|||||||
return [nodes.raw('', f'<sup>{text}</sup>', format='html')], []
|
return [nodes.raw('', f'<sup>{text}</sup>', format='html')], []
|
||||||
|
|
||||||
|
|
||||||
|
def del_role(name, rawtext, text, lineno, inliner, options=None, content=None):
|
||||||
|
return [nodes.raw('', f'<del>{text}</del>', format='html')], []
|
||||||
|
|
||||||
|
|
||||||
def register_roles():
|
def register_roles():
|
||||||
rst.roles.register_local_role('kbd', keyboard_role)
|
rst.roles.register_local_role('kbd', keyboard_role)
|
||||||
rst.roles.register_local_role('sup', superscript_role)
|
rst.roles.register_local_role('sup', superscript_role)
|
||||||
|
rst.roles.register_local_role('del', del_role)
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
Loading…
Reference in New Issue
Block a user