Skip to content

pantoken-root / tools/demo/src / LiveExampleOptions

接口: LiveExampleOptions ​

如何将实时预览无缝拼接到匹配页面上的每个 @example HTML 围栏。

属性 ​

match ​

match: (relativePath) => boolean

仅在 markdown-it env.relativePath 匹配的页面上包裹围栏(例如 CSS-API 页面)。

参数 ​

relativePath ​

string

返回值 ​

boolean


wrap ​

wrap: (html, flags, relativePath) => string

根据其标记、从围栏信息字符串解析出的任何 -flag 令牌,以及页面的 env.relativePath(用于区域/方向查找),构建附加在每个非覆盖型 html 围栏之后的预览块。

参数 ​

html ​

string

flags ​

Set<string>

relativePath ​

string

返回值 ​

string