Skip to content

Update PLAN.md and IMPLEMENTATION.md shortcode arg resolution docs to match implementation #1024

Description

@zeroedin

The shortcode calling convention spec docs in PLAN.md (~L1894) and IMPLEMENTATION.md (~L613) describe the argument resolution approach as using context.Evaluate(token.value) directly. However, TagContext.Evaluate expects evaluable objects (e.g., *VariableLookup), not plain strings — passing a string returns the string unchanged.

The implementation correctly uses liquid.VariableLookupParse(name, nil, nil) to parse the variable name into a *VariableLookup, then calls context.Evaluate(vl) to resolve it.

Update both spec docs to reflect the actual parseTagTokens → resolveTagArgs → resolveVariable flow, including:

  • VariableLookupParse for variable name parsing
  • context.Evaluate on the parsed *VariableLookup (not raw strings)
  • Literal fallback when Evaluate returns nil

Found during PR #1023 review (finding #6 from both CodeRabbitAI and human reviewer).

Refs #981

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions