Skip to content

Commit 5853994

Browse files
committed
fix router
1 parent 2c21428 commit 5853994

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

build/router.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-tiny-http",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "A tiny node.js http framework",
55
"main": "build/http.js",
66
"scripts": {

src/router.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ match = (method, pattern) ->
77
keys = []
88

99
# replace as regex
10-
pattern = pattern.replace /(:|%)([_a-z0-9-]+)/i, (m, prefix, name) ->
10+
pattern = pattern.replace /(:|%)([_a-z0-9-]+)/ig, (m, prefix, name) ->
1111
keys.push name
1212
if prefix == ':' then '([^\\/]+)' else '(.+)'
1313

0 commit comments

Comments
 (0)