Skip to content

Commit 0931c36

Browse files
authored
Merge pull request #12 from samugi/fix-split-array-length
THREESCALE-7643 Fixed the output array of the split filter, it jumped the last element if its length was 1
2 parents 24d1997 + 1d9528e commit 0931c36

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/liquid.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3024,7 +3024,7 @@ local function split( str, pattern )
30243024
end
30253025
end
30263026
until from == nil
3027-
if index < #str then
3027+
if index <= #str then
30283028
table.insert(result, string.sub(str, index))
30293029
end
30303030
return result

0 commit comments

Comments
 (0)