static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

Fixing globs in routes

Open aaronpowell opened this issue 2 years ago • 0 comments

This pull request includes changes to improve the behavior of the globToRegExp function in the src/core/utils/glob.ts file. The function now correctly interprets the * character as a wildcard and escapes the . character to match a literal dot. Additionally, the expected result in the test case for globToRegExp was modified to reflect the updated behavior of the function.

Main changes:

  • src/core/utils/glob.ts: Modified the globToRegExp function to correctly interpret the * character as a wildcard and escape the . character to match a literal dot.
  • src/core/utils/glob.spec.ts: Modified the expected result in the test case for globToRegExp to include the escaped dot character (\.) to match the updated behavior of the function.

Fixes #792

aaronpowell avatar Jan 02 '24 06:01 aaronpowell