Caret
Overview
Caret 可选地添加两个不同的功能,这些功能是围绕角色^
构建的。 The first is insert which inserts <ins></ins>
tags. The second is superscript which inserts <sup></sup>
tags.
可以通过以下内容包含在 Python Markdown 中的 Caret 扩展名:
import markdown
md = markdown.Markdown(extensions=['pymdownx.caret'])
Insert
To wrap content in an insert tag, simply surround the text with double ^
. You can also enable smart_insert
in the options. Smart behavior of insert models that of BetterEm.
Insert Example
Insert me
^^Insert me^^
Superscript
To denote a superscript, you can surround the desired content in single ^
. It uses Pandoc style logic, so if your superscript needs to have spaces, you must escape the spaces.
Superscript Example
H20
texta superscript
H^2^0
text^a\ superscript^
Options
Option | Type | Default | Description |
---|---|---|---|
smart_insert | bool | True | Use smart logic with insert characters. |
insert | bool | True | Enable insert feature. |
superscript | bool | True | Enable superscript feature. |
最后更新: January 1, 2023