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

tpl/tplimpl: Reimplement the ".Params tolower" template transformer #5072

Merged
merged 1 commit into from
Aug 14, 2018

Conversation

bep
Copy link
Member

@bep bep commented Aug 14, 2018

All .Params are stored lowercase, but it should work to access them .Page.camelCase etc. There was, however, some holes in the logic with the old transformer.

This commit fixes that by applying a blacklist instead of the old whitelist logic. .Param is a very distinct key. The original case will be kept in .Data.Params.myParam, but other than that it will be lowercased.

Fixes #5068

@bep bep changed the title tpl/tplimpl: Reimplement the ".Params tolower" template transformer WIP: tpl/tplimpl: Reimplement the ".Params tolower" template transformer Aug 14, 2018
@bep bep force-pushed the tplparamslower branch 5 times, most recently from 6367d26 to 7a3006a Compare August 14, 2018 14:44
All `.Params` are stored lowercase, but it should work to access them `.Page.camelCase` etc. There was, however, some holes in the logic with the old transformer.

This commit fixes that by applying a blacklist instead of the old whitelist logic. `.Param` is a very distinct key. The original case will be kept in `.Data.Params.myParam`, but other than that it will be lowercased.

Fixes gohugoio#5068
@bep bep changed the title WIP: tpl/tplimpl: Reimplement the ".Params tolower" template transformer tpl/tplimpl: Reimplement the ".Params tolower" template transformer Aug 14, 2018
@bep bep merged commit 5c53849 into gohugoio:master Aug 14, 2018
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

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 3, 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.

Inconsistent Handling of .Param Case Sensitivity
1 participant