Skip to content

helpers: Consolidate MakeSegment vs MakePathSanitized - #5282

Merged
bep merged 1 commit into
gohugoio:masterfrom
bep:make-path-consolidate
Oct 3, 2018
Merged

bep merged 1 commit into
gohugoio:masterfrom
bep:make-path-consolidate

Conversation

@bep

@bep bep commented Oct 3, 2018

Copy link
Copy Markdown
Member

In short:

  • Avoid double tolower in MakeSegment
  • Use MakePathSanitized for taxonomies in pageToPermalinkTitle; this matches what MakeSegment does.
  • Move the "double hyphen and space" logic into UnicodeSanitize

The last bullet may be slightly breaking for some that now does not get the "--" in some URLs, but we need to reduce the amount of URL logic.

See #4926

@bep bep mentioned this pull request Oct 3, 2018
@bep bep changed the title helpers: Consolidate MakgeSegment vs MakePathSanitized helpers: Consolidate MakeSegment vs MakePathSanitized Oct 3, 2018
@bep
bep force-pushed the make-path-consolidate branch from 9aa3317 to 205dc55 Compare October 3, 2018 10:20
@bep
bep requested a review from moorereason October 3, 2018 10:20
@bep
bep force-pushed the make-path-consolidate branch 3 times, most recently from 6e0280a to a282492 Compare October 3, 2018 10:37
In short:

* Avoid double tolower in MakeSegment
* Use MakePathSanitized for taxonomies in pageToPermalinkTitle; this matches what MakeSegment does.
* Move the "double hyphen and space" logic into UnicodeSanitize

The last bullet may be slightly breaking for some that now does not get the "--" in some URLs, but we need to reduce the amount of URL logic.

See gohugoio#4926
@bep
bep force-pushed the make-path-consolidate branch from a282492 to 628bac4 Compare October 3, 2018 13:04

@moorereason moorereason left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@bep
bep merged commit e421696 into gohugoio:master Oct 3, 2018
@onedrawingperday

Copy link
Copy Markdown
Contributor

Everything works fine with this PR on my end. 👍

P.S. Wow! This is the 3rd time today that I compiled Hugo from source because of all the new commits. Your hard work is very much appreciated! 🥇

@max-arnold

Copy link
Copy Markdown
Contributor

Does this fix #3577?

@moorereason

Copy link
Copy Markdown
Contributor

@max-arnold, potentially. If you can test it before I do, let me know.

@github-actions

github-actions Bot commented Feb 2, 2022

Copy link
Copy Markdown

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 Feb 2, 2022
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.

4 participants