From 581dfec48e6cd7a20cc600b52876905a4707997c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=B6hm?= <188768+fb55@users.noreply.github.com> Date: Tue, 24 Aug 2021 13:46:05 +0100 Subject: [PATCH] rm other references --- readme.md | 71 ------------------- src/__fixtures__/16-normalize_whitespace.json | 47 ------------ 2 files changed, 118 deletions(-) delete mode 100644 src/__fixtures__/16-normalize_whitespace.json diff --git a/readme.md b/readme.md index 781eb380..82f64960 100644 --- a/readme.md +++ b/readme.md @@ -76,77 +76,6 @@ When the parser is used in a non-streaming fashion, `endIndex` is an integer indicating the position of the end of the node in the document. The default value is `false`. -## Option: `normalizeWhitespace` _(deprecated)_ - -Replace all whitespace with single spaces. -The default value is `false`. - -**Note:** Enabling this might break your markup. - -For the following examples, this HTML will be used: - -```html -
this is the text
-``` - -### Example: `normalizeWhitespace: true` - -```javascript -[ - { - type: "tag", - name: "font", - children: [ - { - data: " ", - type: "text", - }, - { - type: "tag", - name: "br", - }, - { - data: "this is the text ", - type: "text", - }, - { - type: "tag", - name: "font", - }, - ], - }, -]; -``` - -### Example: `normalizeWhitespace: false` - -```javascript -[ - { - type: "tag", - name: "font", - children: [ - { - data: "\n\t", - type: "text", - }, - { - type: "tag", - name: "br", - }, - { - data: "this is the text\n", - type: "text", - }, - { - type: "tag", - name: "font", - }, - ], - }, -]; -``` - --- License: BSD-2-Clause diff --git a/src/__fixtures__/16-normalize_whitespace.json b/src/__fixtures__/16-normalize_whitespace.json deleted file mode 100644 index a9d79b70..00000000 --- a/src/__fixtures__/16-normalize_whitespace.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "Normalize whitespace", - "options": { - "normalizeWhitespace": true - }, - "html": "Line one\n
\t \r\n\f
\nline two
x
", - "expected": [ - { - "data": "Line one ", - "type": "text" - }, - { - "type": "tag", - "name": "br", - "attribs": {} - }, - { - "data": " ", - "type": "text" - }, - { - "type": "tag", - "name": "br", - "attribs": {} - }, - { - "data": " line two", - "type": "text" - }, - { - "type": "tag", - "name": "font", - "attribs": {}, - "children": [ - { - "type": "tag", - "name": "br", - "attribs": {} - }, - { - "data": " x ", - "type": "text" - } - ] - } - ] -}