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

22 lines
442 B
Plaintext

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