2

{{ if (and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")) }}

Wait a minute hugo wtf is that

Comments
  • 1
    For the love of our dear and forgiving god, please use line breaks and indentation
  • 1
    This looks oddly familiar.
    Practically the same way Salesforce handles configurable logic.
  • 0
    That is a really weird way to do and and or operators...
  • 0
    function and($lhs, $rhs) {
    return $lhs && $rhs;
    }
  • 0
    @highlight

    {{ if ( and

    ( or

    ( isset .Params "title" )

    ( isset .Params "caption" )

    )

    ( isset .Params "attr" )

    ) }}
  • 0
    @Lor-inc
  • 0
    It fucked up the indentation _and _ the line breaks but it's still legible
Add Comment