Revision e1282a63
Added by koszko almost 2 years ago
common/patterns.js | ||
---|---|---|
96 | 96 |
throw `unsupported protocol in url '${url}'`; |
97 | 97 |
} |
98 | 98 |
|
99 |
deco.trailing_dash = deco.path[deco.path.length - 1] === "/";
|
|
99 |
deco.trailing_slash = deco.path[deco.path.length - 1] === "/";
|
|
100 | 100 |
|
101 | 101 |
if (deco.domain) { |
102 | 102 |
if (deco.domain.length > max.DOMAIN_CHARS) { |
... | ... | |
151 | 151 |
const path_part = ["", ...deco.path.slice(0, slice)].join("/"); |
152 | 152 |
const path_wildcards = []; |
153 | 153 |
if (slice === deco.path.length && !deco.path_truncated) { |
154 |
if (deco.trailing_dash)
|
|
154 |
if (deco.trailing_slash)
|
|
155 | 155 |
yield path_part + "/"; |
156 | 156 |
if (slice > 0 || deco.proto !== "file") |
157 | 157 |
yield path_part; |
Also available in: Unified diff
finish implementing more efficient querying of URL patterns
The algorithm is implemented and tested. However, it is yet to be hooked into the actual extension.