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

Incorrect indentation of CSS declaration blocks in HTML files #14764

Open
lkintact opened this issue May 13, 2024 · 1 comment
Open

Incorrect indentation of CSS declaration blocks in HTML files #14764

lkintact opened this issue May 13, 2024 · 1 comment
Labels

Comments

@lkintact
Copy link

Steps to reproduce

  1. Run gvim.exe --clean
  2. Copy the following text to the buffer:
<style>
body {
font:
Arial,
Helvetica;
}
</style>
  1. Execute :set filetype=html
  2. Type =G to indent the text. You get the following result:
<style>
	body {
		font:
			Arial,
		Helvetica;
	}
</style>

Expected behaviour

The result should probably be this:

<style>
	body {
		font:
			Arial,
			Helvetica;
	}
</style>

Version of Vim

9.1.296

Environment

OS: Windows 10 Home
Terminal: GUI

Logs and stack traces

No response

@lkintact lkintact added the bug label May 13, 2024
@lkintact
Copy link
Author

This is perhaps related:
If under the same conditions I try to indent this text:

<style>
body {
font:
Arial,
Helvetica;
border:
solid
1px
red;
}
</style>

I get the following result:

<style>
	body {
		font:
			Arial,
		Helvetica;
	border:
		solid
	1px
	red;
	}
</style>

While the expected result is this:

<style>
	body {
		font:
			Arial,
			Helvetica;
		border:
			solid
			1px
			red;
	}
</style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant