Skip to content

Conversation

@oridim
Copy link
Contributor

@oridim oridim commented Aug 23, 2025

The github-slugger library produced consecutive dashes when using non-alphanumeric (guessing here) characters:

> slug("Results + Awards")
'results--awards'

> slug("Results + + Awards")
'results---awards'

Which would cause Valibot's v.slug() validator to reject perfectly fine slugs and not load the pages. ex:

image

This PR fixes it by normalizing all consecutive dashes via a wrapper function.

oridim added 2 commits August 23, 2025 07:43
Any non-alphabetic (guessing here) would result in consecutive dashes instead of being normalized to a single dash. ex.

```js
> slug("Results + Awards")
'results--awards'

> slug("Results + + Awards")
'results---awards'
```
@oridim oridim merged commit 183ab86 into PSH-Computing-AI-club:main Aug 23, 2025
6 checks passed
@oridim oridim deleted the fix/slug-consecutive-dashes branch August 23, 2025 11:55
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.

1 participant