Skip to content

Cannot assign valid string contents #701

@TWiStErRob

Description

@TWiStErRob

I was playing around with the idea of this post and I found that my take on it just breaks Liquid.
/cc @SLaks

This is what I would expect to work:

{% assign endraw = '{% endraw %}' %} contents: _{{endraw}}_
’ %} contents: __

This is how I managed to work around it:

{% assign endraw = '{% endraw %' | append: '}' %} contents: _{{endraw}}_
contents: _{% endraw %}_

... and as a bonus this one even throws an error:

{% assign endraw = '{% endraw ' | append: '%}' %}

Liquid error (line 123): wrong number of arguments (1 for 2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions