shinyaohtani / giturl

Open GitHub URL for given directory
MIT License
5 stars 1 forks source link

Encoding is required if the branch name contains '#' etc. #4

Closed shinyaohtani closed 4 years ago

shinyaohtani commented 4 years ago

bug

Given a branch name such as 'feature/#1', it will output "https://***/feature/#1", which cannot be opened in a browser. (Confirmed on Google Chrome.)

solution idea

This may be work correctly.

  1. split branch name by '/',
  2. and encode all each element,
  3. and join them with separator '/'.