Skip to content



Tilde optionally adds two different features which are syntactically built around the ~ character: delete which inserts <del></del> tags and subscript which inserts <sub></sub> tags.

The Tilde extension can be included in Python Markdown by using the following:

import markdown
md = markdown.Markdown(extensions=['pymdownx.tilde'])


To wrap content in a delete tag, simply surround the text with double ~. You can also enable smart_delete in the options. Smart behavior of delete models that of BetterEm.

Delete Example

Delete me

~~Delete me~~


To denote a subscript, you can surround the desired content in single ~. It uses Pandoc style logic, so if your subscript needs to have spaces, you must escape the spaces.

Subscript Example


texta subscript


text~a\ subscript~


Option Type Default Description
smart_delete bool True Use smart logic with delete characters.
delete bool True Enable delete feature.
subscript bool True Enable subscript feature.

Last update: July 25, 2020