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

format.liquid.forceArgument property splits custom shortcodes in 11ty #192

Open
shkarinn opened this issue Jun 18, 2024 · 2 comments
Open
Labels
Bug Something isn't working in the vscode extension 🎀 Æsthetic The issue pertains to Æsthetic

Comments

@shkarinn
Copy link

The format.liquid.forceArgument property splits custom shortcodes in 11ty across multiple lines, which 11ty does not recognize. 11ty only processes shortcodes that are written in a single line.

When adding this tag to the ignoreTagList property, the plugin throws an error expecting a closing tag.

Steps to Reproduce:

  1. Define multiple-line custom shortcodes with 4 prop's separate by commas.
  2. Set the format.liquid.forceArgument property to 3.
  3. Attempt to build the project using 11ty.
  4. Observe that 11ty does not recognize the multiline shortcodes properly.

Proposed Solution:

  1. Set format.liquid.forceArgument property to a value higher than the shortcodes contain
  2. Don't use commas in shortcode.
  3. Introduce a new property to prevent the splitting of tags across new lines. This property would ensure that tags are kept intact, avoiding issues with shortcode recognition.

I'll create an 11ty issue too. But also need a workaround to exclude tags without closing.

image
image
image

@panoply
Copy link
Owner

panoply commented Jun 18, 2024

Hey @shkarinn

Thanks for this detailed issue. I appreciate it. For now, the workaround will be to use comment ignores, above the tag use:

<!-- esthetic-ignore-next -->
{% img section.img %}

Optionally, you could also use:

{% # esthetic-ignore-next %}

Or wrap the tag within ignore blocks:

<!-- esthetic-ignore-start -->
{% img section.img %}
<!-- esthetic-ignore-end -->

Æsthetic logic for argument and filter formatting was overhauled and in the next release (which is almost ready for shipping) things work differently, with more rules and it will address the issue you are having. I'll also make it possible to allow singleton type tags to be included in the ignoreTagList.

@panoply panoply added Bug Something isn't working in the vscode extension 🎀 Æsthetic The issue pertains to Æsthetic labels Jun 18, 2024
@shkarinn
Copy link
Author

Hi, @panoply!
Thank you for quick answer. Ok, I'll use the workaround for now, waiting for the next version 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working in the vscode extension 🎀 Æsthetic The issue pertains to Æsthetic
Projects
None yet
Development

No branches or pull requests

2 participants