plugin-xml
plugin-xml copied to clipboard
feat: support option `preserveSignificantWhitespace`
Fixes #478
Add new option preserveSignificantWhitespace, to preserve significant whitespace within XML elements. This PR should address all the cases where significant white space exists.
Specifically:
-
spaces within string are preserved:
// before and after prettier identical <v>some string extra space</v> -
string with space(s) at the beginning and/or end:
// before and after prettier identical <v> some string </v> -
mixing elements within string literal is also supported, space(s) surrounding and within string literal will be preserved:
before: <v> some string<abc/>more string </v> after: <v> some string<abc />more string </v>