Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Dec 27, 2024
1 parent 5919de9 commit e544785
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/plugin-api-docgen/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@ export function pluginApiDocgen(options?: PluginOptions): RspressPlugin {
while (matchResult !== null) {
const matchContent = matchResult[0];
const moduleName = matchResult[2] ?? matchResult[5] ?? '';
if (!moduleName) {
return;
}
const apiDoc =
apiDocMap[moduleName] || apiDocMap[`${moduleName}-${lang}`];
apiDocMap[moduleName] ?? apiDocMap[`${moduleName}-${lang}`] ?? '';
content = content.replace(matchContent, apiDoc);
matchResult = new RegExp(apiCompRegExp).exec(content);
}
Expand Down

0 comments on commit e544785

Please sign in to comment.