WickyNilliams / cally

Small, feature-rich calendar components
https://wicky.nillia.ms/cally/
MIT License
1.06k stars 12 forks source link

update internal link in `usage` page #55

Closed josueayala27 closed 18 hours ago

WickyNilliams commented 6 days ago

oh wow, good catch, not sure how i missed that. Or why i would have ever used an absolute link to localhost 🤔

josueayala27 commented 5 days ago

The Link component was restricted to accept URLs with the pattern /${string}/ or /, which excluded valid URLs containing hashes (#) or other additional characters after the slash (/).

For example, the URL "/components/calendar-range/#events" was not accepted due to this restriction.

So the href property type has been modified to accept any string starting with /, removing the /${string}/ pattern restriction and thereby allowing more flexible and complete URLs.

It is now possible to use the Link component with URLs containing hashes:

<Link href="/components/calendar-range/#events">events</Link>

This change improves the flexibility of the Link component, allowing a wider range of valid URLs.

WickyNilliams commented 5 days ago

Ah I should have tested my suggestion first! I wanted the trailing slash to enforce at the type level some consistency in URLs, avoiding redirects from e.g. /page to /page/