fix(build): allow importing files having numbers in extension (#1618)

pull/1653/head
Stephen Zhou 2 years ago committed by GitHub
parent 8a488deac1
commit 0565c38fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -109,7 +109,7 @@ export const snippetPlugin = (md: MarkdownIt, srcDir: string) => {
* captures: ['/path/to/file.extension', 'extension', '#region', '{meta}']
*/
const rawPathRegexp =
/^(.+(?:\.([a-z]+)))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))?$/
/^(.+(?:\.([a-z0-9]+)))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))?$/
const rawPath = state.src
.slice(start, end)

Loading…
Cancel
Save