Skip to content

if condition on empty string #223

@etienneroudeix

Description

@etienneroudeix

Hello, I was just wanting to test if my_variable was an empty string.

I'm using Liquid through Jekyll if it can help.

I tried :

{% if my_variable == '' %}
I'm not empty
{% endif %}

but no way.

In fact I have to do like this

{% if my_variable == %}
I'm not empty
{% endif %}

It sound ugly to me so I let you know.

By the way it's the same behaviour using case condition.

Thank you for your job on this rocking project.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions