Skip to content

pantoken / 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

從該區塊的標記、從 fence info 字串解析出的任何 -flag 令牌,以及頁面的 env.relativePath(用於區域/文字方向查找),建立並附加於每個非覆蓋型 html 程式碼區塊之後的預覽區塊。

參數

html

string

flags

Set<string>

relativePath

string

回傳

string