From 99a5836f13d7d994411a3edbefb92b07f686f2ed Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 29 Apr 2020 19:39:31 +0300 Subject: [PATCH] refactor(v2): make semicolon optional in imports for excerpt --- packages/docusaurus-utils/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus-utils/src/index.ts b/packages/docusaurus-utils/src/index.ts index 8bb9e956d907..fb40e69a802f 100644 --- a/packages/docusaurus-utils/src/index.ts +++ b/packages/docusaurus-utils/src/index.ts @@ -183,7 +183,7 @@ export function getSubFolder(file: string, refDir: string): string | null { } // Regex for an import statement. -const importRegexString = '^(.*import){1}(.+){0,1}\\s[\'"](.+)[\'"];'; +const importRegexString = '^(.*import){1}(.+){0,1}\\s[\'"](.+)[\'"];?'; export function parse( fileString: string,