Files
NapCatQQ/.pnpm-store/v3/files/ab/570723994f9c1e5c3dbf05234fa5167e0ac4802088967555a0897548bafa6fc038b717d38167d11e9853470ed934178c8a969aeeab1b7ee1aa859b8a6bd0fa
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
443 B
Plaintext

/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['fence'], null | undefined>}
*/
export function checkFence(state) {
const marker = state.options.fence || '`'
if (marker !== '`' && marker !== '~') {
throw new Error(
'Cannot serialize code with `' +
marker +
'` for `options.fence`, expected `` ` `` or `~`'
)
}
return marker
}