refactor(v2): make semicolon optional in imports for excerpt (#2696)

This commit is contained in:
Alexey Pyltsyn 2020-04-29 20:05:29 +03:00 committed by GitHub
parent 57c7550a87
commit 16dd08a690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,