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

Unstable formatting: Long string attribute with line break #144

Closed
sentience opened this issue Jan 2, 2023 · 1 comment
Closed

Unstable formatting: Long string attribute with line break #144

sentience opened this issue Jan 2, 2023 · 1 comment
Labels
Bug Something isn't working in the vscode extension 🎀 Æsthetic The issue pertains to Æsthetic

Comments

@sentience
Copy link

This:

  <body class="text-black bg-white dark:text-white dark:bg-slate-900
      accent-accent-600 p-4 md:p-12">

gets formatted to:

  <body class="text-black bg-white dark:text-white dark:bg-slate-900
            accent-accent-600 p-4 md:p-12">

which in turn gets formatted to:

  <body class="text-black bg-white dark:text-white dark:bg-slate-900
                  accent-accent-600 p-4 md:p-12">

and so on. Each time I save my template, the second line gets more whitespace added to the start of it.

@panoply
Copy link
Owner

panoply commented Jan 3, 2023

Hey @sentience

This one is a known issue. When newline characters appear in value strings it will cause an applied indentation. Similar to #143 the issue is resolved in next release (#138). The way around this is to not insert newlines in values.

Sidenote

It's actually difficult to figure out a nice fluid solution to this. Considering a lot of folks choose Tailwind that result in these extraneous class expressions applied in markdown, I originally played with the idea of forcing all space separated values onto newlines, but that become a little wild. I am open to ideas on this one, meaning if you have any suggestions on how these should handled, I'd love some more insight.

@panoply panoply added Bug Something isn't working in the vscode extension 🎀 Æsthetic The issue pertains to Æsthetic labels Jan 3, 2023
@panoply panoply closed this as completed Jul 26, 2023
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