From c425cc844627cdf52d260b8844c47864f13d8794 Mon Sep 17 00:00:00 2001 From: Mostafa Sherif Date: Wed, 18 Jan 2023 17:07:53 -0500 Subject: [PATCH] addon-docs: update story index generator change extract stories condition to positive matcher instead of negative matcher --- 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 abc9ce18a85e..0b54ae4ac1cc 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -164,8 +164,8 @@ export class StoryIndexGenerator { ); } - isDocsMdx(absolutePath: Path) { - return /(? { @@ -174,7 +174,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.isDocsMdx(absolutePath) ? false : this.extractStories(specifier, absolutePath) + this.isStoryFile(absolutePath) ? this.extractStories(specifier, absolutePath): false ); if (!this.options.docs.disable) {