Skip to content

Add specs: HTML comments round-trip verbatim through capture/split - #162

Open
mmorissette wants to merge 1 commit into
mainfrom
html-comment-round-trip-specs
Open

Add specs: HTML comments round-trip verbatim through capture/split#162
mmorissette wants to merge 1 commit into
mainfrom
html-comment-round-trip-specs

Conversation

@mmorissette

@mmorissette mmorissette commented Jul 31, 2026

Copy link
Copy Markdown

Why

Follow-up to shop/world#964845 and https://github.com/shop/issues-merchant-workflows/issues/3882: a literal HTML comment used as a split delimiter must round-trip verbatim through {% capture %}. Horizon's resource-list-carousel builds slide arrays with {% capture %}…<!--@list/split-->…{% endcapture %} then | split: '<!--@list/split-->'.

What

  • New specs/liquid_ruby/html_comment_round_trip.yml with 4 progressive specs (c=121–124, a free run of integer levels), all validated verbatim against reference liquid:
    1. HTML comment survives capture verbatim
    2. split on a comment-shaped delimiter
    3. The full capture → split round trip (the issue's exact ask)
    4. The realistic theme pattern: loop-built list with trailing <!--@list/split--> markers (also pins trailing-empty removal)
  • README liquid_ruby suite count 2,097 → 2,101

All 4 specs pass against examples/liquid_ruby.rb; rake prepush failures are pre-existing on the clean tree (verified via stash) and don't touch the new file.

HTML comments are not Liquid syntax and must pass through the parser,
{% capture %}, and the split filter byte-for-byte. Horizon's
resource-list-carousel relies on this to encode slide arrays as
'<!--@list/split-->'-delimited strings.

Four progressive specs (c=121-124), all validated against reference
liquid: comment survives capture verbatim, split on a comment-shaped
delimiter, the full capture->split round trip, and the realistic
loop-built list with a trailing delimiter.

Ports the storefront integration test removed from shop/world#964845.
Closes shop/issues-merchant-workflows#3882

Assisted-By: devx/e5357c56-2306-4c88-97a2-5a8854545719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant