Cannot assign valid string contents
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11.9k
- Forks
- 1.5k
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 3
Description
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the Liquid assignment examples in the report, including the case that raises an argument-count error. Trace how assign values containing endraw tags are parsed; done means the literal string is preserved in output and the error case no longer fails unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100