@rspress/plugin-api-docgen 1.39.1 → 1.39.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -275,8 +275,9 @@ function pluginApiDocgen(options) {
275
275
  let matchResult = new RegExp(apiCompRegExp).exec(content);
276
276
  if (!matchResult) return;
277
277
  while(null !== matchResult){
278
- const [matchContent, moduleName] = matchResult;
279
- const apiDoc = apiDocMap[moduleName] || apiDocMap[`${moduleName}-${lang}`];
278
+ const matchContent = matchResult[0];
279
+ const moduleName = matchResult[2] ?? matchResult[5] ?? '';
280
+ const apiDoc = apiDocMap[moduleName] ?? apiDocMap[`${moduleName}-${lang}`] ?? '';
280
281
  content = content.replace(matchContent, apiDoc);
281
282
  matchResult = new RegExp(apiCompRegExp).exec(content);
282
283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/plugin-api-docgen",
3
- "version": "1.39.1",
3
+ "version": "1.39.3",
4
4
  "description": "A plugin for rspress to generate api doc.",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "react-docgen-typescript": "2.2.2",
22
22
  "react-markdown": "8.0.7",
23
23
  "remark-gfm": "3.0.1",
24
- "@rspress/shared": "1.39.1"
24
+ "@rspress/shared": "1.39.3"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@microsoft/api-extractor": "^7.48.1",
@@ -40,7 +40,7 @@
40
40
  "peerDependencies": {
41
41
  "react": ">=17.0.0",
42
42
  "react-router-dom": "^6.8.1",
43
- "@rspress/core": "^1.39.1",
43
+ "@rspress/core": "^1.39.3",
44
44
  "typescript": "^5.5.3"
45
45
  },
46
46
  "peerDependenciesMeta": {