Skip to content

Commit

Permalink
refactor: drop normalize
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

We no longer support the ``normalize`` option. It is up to client code
to perform whatever normalization it wants.
  • Loading branch information
lddubeau committed Jun 30, 2018
1 parent 1a5b642 commit 9c6d84c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ Pass the following arguments to the parser function. All are optional.
Settings supported:

* `trim` - Boolean. Whether or not to trim text and comment nodes.
* `normalize` - Boolean. If true, then turn any whitespace into a single
space.
* `xmlns` - Boolean. If true, then namespaces are supported.
* `position` - Boolean. If false, then don't track line/col/position.

Expand Down
1 change: 0 additions & 1 deletion lib/saxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@

function textopts (opt, text) {
if (opt.trim) text = text.trim()
if (opt.normalize) text = text.replace(/\s+/g, ' ')
return text
}

Expand Down

0 comments on commit 9c6d84c

Please sign in to comment.