详细说明: - 添加了V2版本的工作流页面和结果页面 - 更新了Serena记忆文件 - 添加了详细实施计划文档 - 优化了Vite配置 - 更新了项目文档CLAUDE.md - 构建了演示系统的dist版本 - 包含了exhibition-demo的完整依赖
27 lines
689 B
JavaScript
27 lines
689 B
JavaScript
/**
|
|
* @typedef {import('hast').Element} Element
|
|
* @typedef {import('hast').Text} Text
|
|
* @typedef {import('mdast').Break} Break
|
|
* @typedef {import('../state.js').State} State
|
|
*/
|
|
|
|
// Make VS Code show references to the above types.
|
|
''
|
|
|
|
/**
|
|
* Turn an mdast `break` node into hast.
|
|
*
|
|
* @param {State} state
|
|
* Info passed around.
|
|
* @param {Break} node
|
|
* mdast node.
|
|
* @returns {Array<Element | Text>}
|
|
* hast element content.
|
|
*/
|
|
export function hardBreak(state, node) {
|
|
/** @type {Element} */
|
|
const result = {type: 'element', tagName: 'br', properties: {}, children: []}
|
|
state.patch(node, result)
|
|
return [state.applyData(node, result), {type: 'text', value: '\n'}]
|
|
}
|