Skip to content

Commit 0565c38

Browse files
authored
fix(build): allow importing files having numbers in extension (#1618)
1 parent 8a488de commit 0565c38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/markdown/plugins/snippet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const snippetPlugin = (md: MarkdownIt, srcDir: string) => {
109109
* captures: ['/path/to/file.extension', 'extension', '#region', '{meta}']
110110
*/
111111
const rawPathRegexp =
112-
/^(.+(?:\.([a-z]+)))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))?$/
112+
/^(.+(?:\.([a-z0-9]+)))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))?$/
113113

114114
const rawPath = state.src
115115
.slice(start, end)

0 commit comments

Comments
 (0)