diff options
Diffstat (limited to 'src/libexpr/flake/flakeref.cc')
-rw-r--r-- | src/libexpr/flake/flakeref.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/flake/flakeref.cc b/src/libexpr/flake/flakeref.cc index a34d766d7..c46661df8 100644 --- a/src/libexpr/flake/flakeref.cc +++ b/src/libexpr/flake/flakeref.cc @@ -67,8 +67,10 @@ std::pair<FlakeRef, std::string> parseFlakeRefWithFragment( { using namespace fetchers; + static std::string fnRegex = "[0-9a-zA-Z-._~!$&'\"()*+,;=]+"; + static std::regex pathUrlRegex( - "(" + pathRegex + "/?)" + "(/?" + fnRegex + "(?:/" + fnRegex + ")*/?)" + "(?:\\?(" + queryRegex + "))?" + "(?:#(" + queryRegex + "))?", std::regex::ECMAScript); |