强调支持扩展(Markdig 规范文档)
以下是一些额外的强调支持:
删除线
通过在文本周围使用 ~~
来删除一段文本。生成的 HTML 的语义是使用 <del>
标签。
The following text ~~is deleted~~
.
<p>The following text <del>is deleted</del></p>
上标和下标
上标可以通过在文本周围使用 ^
字符来写;下标可以通过在要下标的文本周围使用 ~
字符来写。
H~2~O 是液体。2^10^ 是 1024
.
<p>H<sub>2</sub>O 是液体。2<sup>10</sup> 是 1024</p>
某些标点字符不受禁止在内联分隔符中使用的规则约束
One quintillionth can be expressed as 10^-18^
Daggers^†^ and double-daggers^‡^ can be used to denote notes.
.
<p>One quintillionth can be expressed as 10<sup>-18</sup></p>
<p>Daggers<sup>†</sup> and double-daggers<sup>‡</sup> can be used to denote notes.</p>
插入
插入文本可用于指定文档中添加了文本。生成的 HTML 的语义是使用 <ins>
标签。
++Inserted text++
.
<p><ins>Inserted text</ins></p>
标记
标记文本可用于指定文档中被标记的文本。生成的 HTML 的语义是使用 <mark>
标签。
==Marked text==
.
<p><mark>Marked text</mark></p>
HTML 实体的强调
This is text MyBrand ^®^ and MyTrademark ^™^
This is text MyBrand^®^ and MyTrademark^™^
This is text MyBrand~®~ and MyCopyright^©^
.
<p>This is text MyBrand <sup>®</sup> and MyTrademark <sup>TM</sup>
This is text MyBrand<sup>®</sup> and MyTrademark<sup>TM</sup>
This is text MyBrand<sub>®</sub> and MyCopyright<sup>©</sup></p>