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

Bug: Spaces are not maintained between interpolations #447

Closed
1 of 7 tasks
OiYouYeahYou opened this issue Jun 2, 2023 · 2 comments · Fixed by #448
Closed
1 of 7 tasks

Bug: Spaces are not maintained between interpolations #447

OiYouYeahYou opened this issue Jun 2, 2023 · 2 comments · Fixed by #448
Assignees
Labels
type: bug Functionality that does not work as intended/expected

Comments

@OiYouYeahYou
Copy link
Collaborator

OiYouYeahYou commented Jun 2, 2023

Plugin Version

^2.5.0

Prettier Version

^2.8.8

Which frameworks are affected?

  • none
  • vue
  • angular
  • svelte

Node Version

16.13/0

Which operating systems have you used?

  • Linux
  • macOS
  • Windows

Prettier config

{
	"useTabs": true,
	"tabWidth": 4,
	"semi": false,
	"singleQuote": true
}

Input

li #[b #{ key }:] #{ value }
li #{ key } #{ value }
li #[b #{ key }:] #[i= value]

li #[b #{ key }: ]#{ value }
li #[b #{ key }: ]#[i= value]

Output or Error

li #[b #{ key }:]#{ value }
li #{ key }#{ value }
li #[b #{ key }:]#[i= value]

li #[b #{ key }:]#{ value }
li #[b #{ key }:]#[i= value]

Expected Output

li #[b #{ key }:] #{ value }
li #{ key } #{ value }
li #[b #{ key }:] #[i= value]

li #[b #{ key }: ]#{ value }
li #[b #{ key }: ]#[i= value]

Additional Context

Currently enforcing the space with a literal   so it's not breaking, but it is a bit of a pain and ugly. I don't mind so much the collapsing inside of the interpolation though

@Shinigami92 Shinigami92 added the type: bug Functionality that does not work as intended/expected label Jun 2, 2023
@Shinigami92 Shinigami92 self-assigned this Jun 2, 2023
@Shinigami92
Copy link
Member

Fixed in v2.5.1 🙂

@OiYouYeahYou
Copy link
Collaborator Author

Thanks for the very fast turn around 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants