fix: 修复导出html接口文档时,不同目录下有相同接口名导致的接口错位问题 (#2270)

Co-authored-by: wangxl <wangxl@onton.net>
This commit is contained in:
bingyiyu1 2021-08-24 14:25:54 +08:00 committed by GitHub
parent f8a3d94c61
commit 47ebd8bc4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -258,7 +258,7 @@ function createInterMarkdown(basepath, listItem, isToc) {
let mdTemplate = ``;
const toc = `[TOC]\n\n`;
// 接口名称
mdTemplate += `\n## ${escapeStr(`${listItem.title}\n<a id=${listItem.title}> </a>`, isToc)}\n`;
mdTemplate += `\n## ${escapeStr(`${listItem.title}\n<a id=${listItem.title + listItem.catid}> </a>`, isToc)}\n`;
isToc && (mdTemplate += toc);
// 基本信息
mdTemplate += createBaseMessage(basepath, listItem);