mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 12:21:31 +08:00
fix(docs): handle duplicated routes in docs
This commit is contained in:
@@ -96,8 +96,17 @@ function generateMd(lang) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const processedPaths = new Set();
|
||||||
|
|
||||||
for (const realPath of realPaths) {
|
for (const realPath of realPaths) {
|
||||||
const data = docs[category][namespace].routes[realPath];
|
const data = docs[category][namespace].routes[realPath];
|
||||||
|
if (Array.isArray(data.path)) {
|
||||||
|
if (processedPaths.has(data.path[0])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
processedPaths.add(data.path[0]);
|
||||||
|
}
|
||||||
|
|
||||||
const test = testResult.find((t) => t.title === realPath);
|
const test = testResult.find((t) => t.title === realPath);
|
||||||
const parsedTest = test
|
const parsedTest = test
|
||||||
? {
|
? {
|
||||||
|
|||||||
Reference in New Issue
Block a user