Shopify / Shopify/liquid

Operator Syntax formatting issue

Open
#1,647 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
11.9k
Forks
1.5k
Avg merge
17h 55m
Merged PRs (30d)
3

Description

Not sure if this is intentional, but it's easy for a new programmer to not notice the space requirements around the operator because there is no error messages it just doesn't work as it seems it should.

{% if 1==1 %} nothing is output {% endif %}

{% if 1 == 1 %} with spaces works {% endif %}

{% liquid

  if 1==1
     echo 'nothing is output'
  endif

  if 1 == 1
     echo 'with spaces works'
  endif

%}

Output:




 with spaces works 

with spaces works

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the inline and liquid examples in the report, comparing operators with and without surrounding spaces. Determine whether the no-output behavior is intended, then define completion as either consistent operator handling or a clear error message, with regression coverage for both forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.