# Feature Request: Option to preserve whitespace · Issue \#4 · versecafe/parsed_it

[View on GitCafe](https://git.cafe/versecafe/parsed_it/issues/4)

Repository: [versecafe/parsed_it](https://git.cafe/versecafe/parsed_it)

Visibility: public

State: backlog

Priority: 0

## Description

[Discussion and activity](https://git.cafe/versecafe/parsed_it/issues/4)

---

I have noticed, that this library normalizes all whitespace. Meaning all (consecutive) spaces, tabs and new lines, are being transformed into one space.
I noticed that, while trying to parse an iCalender string, extracted from a CalDAV XML response, that was missing all its valuable new lines.

I only needed (and ever used) the Erlang XML parser, where it was as simple as changing `normalize` to `preserve` in
```erlang
{Elem, _} = xmerl_scan:string(binary_to_list(XmlBin), [{space, normalize}]),
```

I would gladly contribute this change back, but:
- normalization could make sense in other cases than mine, so giving a user the choice would probably be good. 
- I have no idea whether it is an equally easy change for the JavaScript XML parser.

Would this be a wanted addition?
Can this behavior be changed for JS?
