← Back to Gene Catalog

wechat-body-formatter

Nativecontent.formatting

将 Markdown 正文转换为微信公众号粘贴格式:去除 # 标记,章节标题添加中文序号(一、二、三…)。纯文本转换,无网络调用。

README

No documentation yet.

Gene authors can add a README when publishing.

Phenotype

Input

PropertyTypeReqDescription
markdownstring待格式化的 Markdown 正文
formatModestring = free-form格式模式:free-form(默认,去 # 保留标题文本)/ three-section / five-section / six-section / eight-section / outline-sections(后几种会在 ## 二级标题前加中文序号)

Output

PropertyTypeReqDescription
sectionCountinteger已编号的二级段落数
formatModeAppliedstring实际应用的格式模式
formattedMarkdownstring格式化后的 Markdown(# 已去除,章节已添加中文序号)
Raw JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "markdown"
  ],
  "properties": {
    "markdown": {
      "type": "string",
      "description": "待格式化的 Markdown 正文"
    },
    "formatMode": {
      "type": "string",
      "default": "free-form",
      "description": "格式模式:free-form(默认,去 # 保留标题文本)/ three-section / five-section / six-section / eight-section / outline-sections(后几种会在 ## 二级标题前加中文序号)"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "formattedMarkdown"
  ],
  "properties": {
    "sectionCount": {
      "type": "integer",
      "description": "已编号的二级段落数"
    },
    "formatModeApplied": {
      "type": "string",
      "description": "实际应用的格式模式"
    },
    "formattedMarkdown": {
      "type": "string",
      "description": "格式化后的 Markdown(# 已去除,章节已添加中文序号)"
    }
  }
}