Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LiquidDoc] Parser support for optional parameters #733

Draft
wants to merge 3 commits into
base: jm/prevent_hover_nonexistent_snippets
Choose a base branch
from

Conversation

jamesmengo
Copy link
Contributor

@jamesmengo jamesmengo commented Jan 24, 2025

What are you adding in this PR?

Adds parser support for [ and ] delimiters around the stringName, which indicate that a param is optional

Within the code, I'm storing this as 'required' rather than 'optional'. The default will be required: true

@param [paramName]

What's next? Any followup issues?

What did you learn?

Before you deploy

  • This PR includes a new checks or changes the configuration of a check
    • I included a minor bump changeset
    • It's in the allChecks array in src/checks/index.ts
    • I ran yarn build and committed the updated configuration files
      • If applicable, I've updated the theme-app-extension.yml config
  • I included a minor bump changeset
  • My feature is backward compatible
  • I included a patch bump changeset

Copy link
Contributor Author

jamesmengo commented Jan 24, 2025

@jamesmengo jamesmengo changed the title Add optional param delimiters to ohm parser [LiquidDoc] Parser support for optional parameters Jan 24, 2025
@jamesmengo jamesmengo force-pushed the jm/parse_optional_params branch from 04f5d07 to 9b8824b Compare January 24, 2025 22:36
@jamesmengo jamesmengo marked this pull request as ready for review January 24, 2025 22:53
@jamesmengo jamesmengo requested a review from a team as a code owner January 24, 2025 22:53
@jamesmengo jamesmengo marked this pull request as draft January 24, 2025 22:53
@jamesmengo jamesmengo force-pushed the jm/parse_optional_params branch from 9b8824b to c0e6ed0 Compare January 24, 2025 23:22
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