From b4dc6121c925b435e67e4ee445bf1080192c00d5 Mon Sep 17 00:00:00 2001 From: Mostafa Sherif Date: Fri, 27 Jan 2023 02:55:45 -0500 Subject: [PATCH] Revert "addon-docs: update story index generator " #20679 This reverts commits c425cc844627cdf52d260b8844c47864f13d8794 f1765bfd2d116c1022bdb8f2ff9295e3cc368dbb --- code/lib/core-server/src/utils/StoryIndexGenerator.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.ts index 6d8817147f0f..8ae3c2478265 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -170,8 +170,8 @@ export class StoryIndexGenerator { ); } - isStoryFile(absolutePath: Path) { - return /(\.(js|jsx|ts|tsx)|\.stories\.mdx)$/i.test(absolutePath); + isDocsMdx(absolutePath: Path) { + return /(? { @@ -180,7 +180,7 @@ export class StoryIndexGenerator { // files may use the `` syntax, which requires // that the story file that contains the meta be processed first. await this.updateExtracted(async (specifier, absolutePath) => - this.isStoryFile(absolutePath) ? this.extractStories(specifier, absolutePath) : false + this.isDocsMdx(absolutePath) ? false : this.extractStories(specifier, absolutePath) ); if (!this.options.docs.disable) {