Skip to content

Instantly share code, notes, and snippets.

@tyteen4a03
Created February 9, 2015 02:23
Show Gist options
  • Save tyteen4a03/abb9433dded48adf270f to your computer and use it in GitHub Desktop.
Save tyteen4a03/abb9433dded48adf270f to your computer and use it in GitHub Desktop.
Shopify slice bug
<span class="test1">{{ "abcde" | slice: 0, -2 }}</span>
<span class="test2">{{ "abcde" | slice: -2, 0 }}</span>
<span class="test3">{{ "abcde" | slice: 1, -2 }}</span>
<span class="test4">{{ "abcde" | slice: -2, 1 }}</span>
<span class="test5">{{ "abcde" | slice: 0, 1 }}</span>
<span class="test6">{{ "abcde" }}</span>
@tyteen4a03
Copy link
Author

Test 1 - 3 won't output anything while test 4 - 6 will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment