You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[LiquidDoc] Parsing support for optional parameters and default values
----
- Added a parameter `required` to the LiquidDocParamNode
- By default, parameters are required unless they have `[]` around the name
- Parameters with incomplete delimiters `e.g. ([missingTail)` will map to a `TextNode`
- Default values are supported for optional parameters - `[param=default]`
- Default values will match anything between `=` and `]`. Leading and Trailing spaces are trimmed.
I originally tried accessing everything from the top level in the param node.
This is still the goal, but I think this should be done at stage 2 so that we can leverage the recursive nature of how to-AST works.
My original approach attempted to Write everything to the top level in stage 1, but we should be doing this in stage 2.
Add support for parsing optional parameters in LiquidDoc. Optional parameters are designated by wrapping the name in square brackets, and can accept a default value (e.g. `@param [parameter_name=default]`).
0 commit comments