Skip to content

odd formatting for mixed content #1797

Closed

Description

@pddshk

Description

given a document with a node with mixed content like

<root><bbbbbb>c<g>hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh</g><g>kkkkkkkkk</g></bbbbbb></root>

autoformat produces

<root>
	<bbbbbb>c<g>hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh</g><g>
		kkkkkkkkk</g></bbbbbb>
</root>

Expected result

this variant looks much cleaner

<root>
	<bbbbbb>
		c
		<g>hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh</g>
		<g>kkkkkkkkk</g>
	</bbbbbb>
</root>

Additional info

Applying autoformat to the example in expected result clause produces

<root>
	<bbbbbb> c <g>hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh</g>
		<g>
		kkkkkkkkk</g>
	</bbbbbb>
</root>

which differs from autoformat applied to a single line and also looks odd.
Also it look like it mess up with indentation when editing mixed content

Activity

  1. added
    formattingThis issue or enhancement is related to formatting support
    on Sep 9, 2026
  2. 40 remaining items

  3. added this to the 0.32.0 milestone on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingformattingThis issue or enhancement is related to formatting support

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions