Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow input to start with slash by removing head slashes #561

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jdavidferreira
Copy link

@jdavidferreira jdavidferreira commented Feb 26, 2024

  • Allow input param to start with slash (/) by removing head slashes

package.json Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

From the docs:

Leading slashes in input are disallowed when using this option to enforce consistency and avoid confusion about how the input URL is handled, given that input will not follow the normal URL resolution rules when prefixUrl is being used, which changes the meaning of a leading slash.

@jdavidferreira
Copy link
Author

jdavidferreira commented Feb 26, 2024

From the docs:

Leading slashes in input are disallowed when using this option to enforce consistency and avoid confusion about how the input URL is handled, given that input will not follow the normal URL resolution rules when prefixUrl is being used, which changes the meaning of a leading slash.

I see. Could it be something "discouraged", rather than something "disallowed"? From the little I saw, I don't see how this change could break things in the library. 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants