From 9c6d84cef17f37314aabf6a0c068ddb32d0bd856 Mon Sep 17 00:00:00 2001 From: Louis-Dominique Dubeau Date: Sat, 30 Jun 2018 11:35:06 -0400 Subject: [PATCH] refactor: drop normalize BREAKING CHANGE: We no longer support the ``normalize`` option. It is up to client code to perform whatever normalization it wants. --- README.md | 2 -- lib/saxes.js | 1 - 2 files changed, 3 deletions(-) diff --git a/README.md b/README.md index e0cbb683..c8505b53 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/lib/saxes.js b/lib/saxes.js index db891642..c071e19f 100644 --- a/lib/saxes.js +++ b/lib/saxes.js @@ -358,7 +358,6 @@ function textopts (opt, text) { if (opt.trim) text = text.trim() - if (opt.normalize) text = text.replace(/\s+/g, ' ') return text }