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

22 lines
460 B
Plaintext

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