handle/handleize filter should return a Liquid-consistent value#426
Merged
sebastienros merged 12 commits intosebastienros:mainfrom Jan 2, 2022
Merged
handle/handleize filter should return a Liquid-consistent value#426sebastienros merged 12 commits intosebastienros:mainfrom
sebastienros merged 12 commits intosebastienros:mainfrom
Conversation
hishamco
commented
Dec 11, 2021
| [InlineData("One1Two2Three3", "one1-two2-three3")] | ||
| [InlineData("ONE1TWO2THREE3", "one1two2three3")] | ||
| [InlineData("First_Second_ThirdHi", "first_second_third-hi")] | ||
| [InlineData("First_Second_ThirdHi", "first-second-third-hi")] |
Collaborator
Author
There was a problem hiding this comment.
The string is converted to lowercase, and any spaces and special characters replaced by hyphens (-).
According to the liquid docs, if the underscore is a special character that means it should be replaced by hypen
Owner
|
Have you looked at how the SlugService works in Orchard? |
Collaborator
Author
Nope, but I will have a quick look now ... |
Collaborator
Author
|
It quite similar except I used a |
Collaborator
Author
|
Finally I did it with a single loop, hope it goes much better |
hishamco
commented
Dec 14, 2021
Collaborator
Author
|
@sebastienros is there anything else prevent from merge this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #424
/cc @deanebarker