Tilde
Overview
New in 12.0
Tilde was rewritten from the ground up. Some subtle difference may be observed compared to older versions, but these changes were made to align better with expected nesting conventions in the majority of parsers and to improve performance.
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:
Tip
PyMdown Extensions uses one delimiter processor for emphasis, deletions, insertions, subscripts, superscripts and marks via BetterEm, Tilde, Caret, and Mark. This allows all delimiter to be parsed simultaneously providing the best nesting logic. So for best results, pair Tilde with BetterEm.
Delete
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 me
Subscript
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.
CH3CH2OH
texta subscript
If desired, the Pandoc requirement of "no spaces", unless they are escaped, can be disabled via the no_space
option.
texta subscript
New in 12.0
no_space is new in 12.0.
Options
| Option | Type | Default | Description |
|---|---|---|---|
smart_delete |
bool | False |
Use smart logic with delete characters. |
delete |
bool | True |
Enable delete feature. |
subscript |
bool | True |
Enable subscript feature. |
no_space |
bool | True |
Enable Pandoc style requirement of "no unescaped spaces". |