Shopify / liquid

Liquid markup language. Safe, customer facing template language for flexible web apps.
https://shopify.github.io/liquid/
MIT License
11.13k stars 1.39k forks source link

Update liquid docs for named parameters #1831

Closed graygilmore closed 3 weeks ago

graygilmore commented 1 month ago

The YARD liquid gem now supports specifying named parameters. For the core liquid tags and filters this is the only object I could find that needed to be updated.

To specify a named parameter you need to add a : to the end of the name:

# @liquid_optional_param foo [string] This is a positional parameter
# @liquid_optional_param bar: [string] This is a named parameter

Adding a colon will make sure that the newly added positional attribute in the JSON docs will be set to false.