/** * 토글 블록 마크다운 줄 배열을 만든다. * @param {{ title?: string, body?: string }} options - 옵션 * @returns {string[]} 마크다운 줄 */ export const buildToggleBlockLines = (options = {}) => { const title = String(options.title ?? '').trim() || '더 보기' const body = String(options.body ?? '').replace(/\r/g, '') const bodyLines = body.length ? body.split('\n') : [''] return [ `:::toggle ${title}`, ...bodyLines, ':::' ] }