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

fix: file path is not an absolute path when startswith "#" #3736

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YourWildDad
Copy link

@YourWildDad YourWildDad commented Jun 30, 2022

What:

I don't know why this function thinks that the path starting with '#' an absolute path, but according to the definition of absolute path, this is wrong, and the path name starting with '#' return false in the built-in functions in many languages

Why:

Same as nodejs built-in implementation require('path').isAbsolute(). The file path starting with '#' is not an absolute path.

How:

Modify the regular expression to remove the match at the starting of '#'

Checklist:

  • Documentation
  • Added/updated unit tests
  • Code complete

@matthew-dean
Copy link
Member

Is there a real-world use case where this has caused a problem? In Less, this function determines if the URL should be re-written, which a URL starting with # would not.

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