Skip to content

Commit 2ea948c

Browse files
committed
Use /#? as default delimiter
1 parent 0d83ceb commit 2ea948c

File tree

3 files changed

+108
-61
lines changed

3 files changed

+108
-61
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const { pathToRegexp, match, parse, compile } = require("path-to-regexp");
3333
- **strict** When `true` the regexp allows an optional trailing delimiter to match. (default: `false`)
3434
- **end** When `true` the regexp will match to the end of the string. (default: `true`)
3535
- **start** When `true` the regexp will match from the beginning of the string. (default: `true`)
36-
- **delimiter** The default delimiter for segments, e.g. `[^/]` for `:named` patterns. (default: `'/'`)
36+
- **delimiter** The default delimiter for segments, e.g. `[^/#?]` for `:named` patterns. (default: `'/#?'`)
3737
- **endsWith** Optional character, or list of characters, to treat as "end" characters.
3838
- **encode** A function to encode strings before inserting into `RegExp`. (default: `x => x`)
3939
- **prefixes** List of characters to automatically consider prefixes when parsing. (default: `./`)

0 commit comments

Comments
 (0)