Describe the bug
Trailing whitespace in PI is not preserved.
One trailing whitespace is preserved if the PI does not have data.
To Reproduce
https://stackblitz.com/edit/js-xmldom-template-mcmkty?file=index.js
Expected behavior
The PI without data should have no trailing whitespace.
The trailing whitespace in PI with data should be preserved.
From DOM Level 1 spec:
Attributes
target
The target of this processing instruction. XML defines this as being the first token following the markup that begins the processing instruction.
data
The content of this processing instruction. This is from the first non white space character after the target to the character immediately preceding the ?>.
Runtime & Version:
xmldom version: 0.8.8
Describe the bug
Trailing whitespace in PI is not preserved.
One trailing whitespace is preserved if the PI does not have data.
To Reproduce
https://stackblitz.com/edit/js-xmldom-template-mcmkty?file=index.js
Expected behavior
The PI without data should have no trailing whitespace.
The trailing whitespace in PI with data should be preserved.
From DOM Level 1 spec:
Runtime & Version:
xmldom version: 0.8.8