node-xml2js icon indicating copy to clipboard operation
node-xml2js copied to clipboard

Fix trim option for empty tags

Open AHarman opened this issue 3 years ago • 3 comments

Previously, this test would fail:

'test trimming on empty tag with whitespace': skeleton(trim: true, (r) ->
    equ r.sample.emptytestanother[0], '')

where "emptytestanother" looked like this:

    <emptytestanother>

    </emptytestanother>

The value was coming back as \n \n (the whitespace between the tags).

AHarman avatar Apr 18 '22 22:04 AHarman

Can you add the test and implement the fix in the CoffeeScript source code?

Leonidas-from-XIV avatar Apr 19 '22 13:04 Leonidas-from-XIV

Sorry about that! Committed the wrong files.

I've fixed that and pushed the right changes.

AHarman avatar Apr 19 '22 18:04 AHarman