Skip to content

Comments

Add tablerow tag support#906

Merged
sebastienros merged 2 commits intomainfrom
feature/tablerow-tag
Jan 20, 2026
Merged

Add tablerow tag support#906
sebastienros merged 2 commits intomainfrom
feature/tablerow-tag

Conversation

@sebastienros
Copy link
Owner

Summary

Implements the Liquid tablerow tag that generates HTML table rows for every item in an array.

Features

  • Basic iteration: {% tablerow item in collection %}{% endtablerow %}
  • cols: parameter for column count
  • limit: parameter to limit iterations
  • offset: parameter to start at an offset
  • Full tablerowloop object with all properties:
    • index, index0 - 1-based and 0-based iteration index
    • col, col0 - 1-based and 0-based column index
    • row - 1-based row index
    • first, last - boolean for first/last iteration
    • col_first, col_last - boolean for first/last column in row
    • length - total number of iterations
    • rindex, rindex0 - reverse index

Implementation

The implementation follows the Shopify Liquid Ruby reference implementation and matches the same parser pattern as the existing for tag.

Files Changed

  • Fluid/Ast/TableRowStatement.cs - AST node for tablerow tag
  • Fluid/Values/TableRowLoopValue.cs - tablerowloop object
  • Fluid/FluidParser.cs - Parser registration
  • Fluid/Parser/TagParsers.cs - TableRowModifier struct
  • Fluid/Ast/AstVisitor.cs - Visitor support
  • Fluid/Ast/AstRewriter.cs - Rewriter support

Testing

All existing tests pass.

GitHub Copilot CLI added 2 commits January 18, 2026 12:44
Implements the Liquid tablerow tag that generates HTML table rows for every item in an array.

Features:
- Basic iteration: {% tablerow item in collection %}{% endtablerow %}
- cols: parameter for column count
- limit: parameter to limit iterations
- offset: parameter to start at an offset
- Full tablerowloop object with all properties (index, index0, col, col0, row, first, last, col_first, col_last, length, rindex, rindex0)

The implementation follows the Shopify Liquid Ruby reference implementation.
@sebastienros sebastienros merged commit fa6e707 into main Jan 20, 2026
3 checks passed
@sebastienros sebastienros deleted the feature/tablerow-tag branch January 20, 2026 15:04
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