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

Add nil comparison to where tpl function #1238

Closed

Commits on Jun 29, 2015

  1. Add nil comparison to where tpl function

    `where` template function's internal condition check function always
    returns `false` when a target value doesn't exist or it's nil value but
    this behavior makes it difficult to filter values which doesn't have a
    particular parameter.
    
    To solve it, this adds nil value comparison to the function.
    `where Values ".Param.key" nil` like clause can be used for the case
    above.
    
    Only "=", "==", "eq", "!=", "<>", "ne" operators are allowed to be used
    with `nil`. If an other operator is passed with `nil`, the condition
    check function returns `false` like before.
    
    Fix gohugoio#1232
    tatsushid committed Jun 29, 2015
    Configuration menu
    Copy the full SHA
    7d5bb98 View commit details
    Browse the repository at this point in the history