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

helpers: Allow hyphen characters in UnicodeSanitize #8000

Closed
wants to merge 1 commit into from

Conversation

moorereason
Copy link
Contributor

Improve handling of pre-existing hyphens in input to UnicodeSanitize.
This commit accomplishes three things:

  1. Explicitly allow hyphens
  2. Avoid appending a hyphen if a preceeding hyphen is found
  3. Avoid prepending a hyphen if a trailing hyphen is found

Fixes #7288

Improve handling of pre-existing hyphens in input to UnicodeSanitize.
This commit accomplishes three things:

1. Explicitly allow hyphens
2. Avoid appending a hyphen if a preceeding hyphen is found
3. Avoid prepending a hyphen if a trailing hyphen is found

Fixes gohugoio#7288
@bep
Copy link
Member

bep commented Nov 28, 2020

Do you use a formatter that's not gofmt?

@moorereason
Copy link
Contributor Author

Yes, but the import reorg is me being picky. https://github.com/mvdan/gofumpt

@kaushalmodi
Copy link
Contributor

@moorereason Can you please revive this PR?

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double-hyphens in post URLs reduce to single-hyphens; regression introduced in v0.50 causes links to break
3 participants