diff --git a/pandoc_import_code.py b/pandoc_import_code.py index c57b09a..d89cce6 100644 --- a/pandoc_import_code.py +++ b/pandoc_import_code.py @@ -134,7 +134,7 @@ def action(elem, doc): else: raise ValueError(f'[code import] {raw_path} should begin with @/') - rawPathRegexp = r'^(.+(?:\.([a-z]+)))(?:#([\w-]+))?(?: ?({\d(?:[,-]\d)?}))?$' + rawPathRegexp = r'^(.+(?:\.([a-z]+)))(?:#([\w-]+))?(?: ?({\d+(?:[,-]\d+)?}))?$' search = re.search(rawPathRegexp, raw_path) if search is None: