Enum Class XMLFormattingOptions.MixedContent

java.lang.Object
java.lang.Enum<XMLFormattingOptions.MixedContent>
org.eclipse.lemminx.settings.XMLFormattingOptions.MixedContent
All Implemented Interfaces:
Serializable, Comparable<XMLFormattingOptions.MixedContent>, Constable
Enclosing class:
XMLFormattingOptions

public static enum XMLFormattingOptions.MixedContent extends Enum<XMLFormattingOptions.MixedContent>
Controls how mixed content (text + child elements) is formatted.
  • normalize (default) — backward-compatible behavior. Collapses whitespace (including newlines) to single spaces within text nodes. Line breaks in whitespace-only gaps between sibling elements are preserved with normalized indentation. No block/inline element distinction. Use case: <p> text\n <b>bold</b> more </p> → <p> text <b>bold</b> more </p> (newline in text joined). Use case: <p> \n <b>bold</b>\n <i>more</i>\n </p> → line breaks between elements preserved.
  • reflow — smart wrapping. Collapses inline whitespace to a single space but preserves newlines within text nodes (unlike normalize which collapses them). When maxLineWidth is set, content soft-wraps at word and element boundaries. Block elements (those listed in blockElements) always start on their own line, and text after a block element starts on a new line. Use case: <p> text <b>bold</b> more </p> with maxLineWidth=40 → wraps overflowing content to new lines.
  • expand — always put each mixed content child on its own line (one child per line), regardless of maxLineWidth. Use case: <p> text <b>bold</b> </p> → <p> \n text\n <b>bold</b>\n </p> .
  • preserve — don't reformat mixed content at all. Use case: <p> text <b>bold</b> more </p> → unchanged.