Shopify / Shopify/liquid

`break` tag behaviour outside of a `for` tag

Open
#1,939 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello! I just wanted to ask a question about break and its behaviour.

In my work, I've noticed that break works outside of a for tag, for example in a rendered snippet or even in a section file. I do find this useful as it allows for a way to halt the proceeding Liquid within the file, without having to wrap all of the code in an if statement.

My question is then, how intentional is this behaviour? Is it something that's at increased risk of changing unexpectedly?

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

No file, test, or entry point is identified in the issue. Start by locating the implementation and tests for break and for tags, then determine whether using break outside for is supported behavior; done means reaching and recording a clear project decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
web-dev
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.