Conversation
sebastienros
left a comment
There was a problem hiding this comment.
A few comments but I don't disagree with the idea
This reverts commit e9f3826.
|
Waiting for filters to be split |
Could you please elaborate? BTW, we can combine the filters {{ "Ελληνικά" | transliterate | slugify }}That means there's no need for slugify arguments |
| { | ||
| var transliterateArg = arguments["transliterate"]; | ||
| var transliterate = transliterateArg.IsNil() || transliterateArg.ToBooleanValue(); | ||
| var slug = transliterate |
There was a problem hiding this comment.
I think we should keep the two filters separate. I looked at the implementation of the service and the slugification logic is not impacted by the transliteration, these are two distinct operations. We should just do | transliterate | slugify
public string Slugify(string text, bool transliterate)
{
if (transliterate && !string.IsNullOrEmpty(text))
{
text = text.Transliterate();
}
return Slugify(text);
}For the same reason this was extracted from the service in this PR.
There was a problem hiding this comment.
Same as I mentioned in my above comment
Related to #19009
/cc @urbanit