defuddle 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/defuddle.d.ts +2 -1
- package/dist/index.full.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Defuddle aims to output clean and consistent HTML documents. It was written for
|
|
|
12
12
|
Defuddle can be used as a replacement for [Mozilla Readability](https://github.com/mozilla/readability) with a few differences:
|
|
13
13
|
|
|
14
14
|
- More forgiving, removes fewer uncertain elements.
|
|
15
|
-
- Provides a consistent output for footnotes,
|
|
15
|
+
- Provides a consistent output for footnotes, math, code blocks, etc.
|
|
16
16
|
- Uses a page's mobile styles to guess at unnecessary elements.
|
|
17
17
|
- Extracts more metadata from the page, including schema.org data.
|
|
18
18
|
|
package/dist/constants.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const PRESERVE_ELEMENTS: Set<string>;
|
|
|
5
5
|
export declare const INLINE_ELEMENTS: Set<string>;
|
|
6
6
|
export declare const HIDDEN_ELEMENT_SELECTORS: string;
|
|
7
7
|
export declare const EXACT_SELECTORS: string[];
|
|
8
|
+
export declare const TEST_ATTRIBUTES: string[];
|
|
8
9
|
export declare const PARTIAL_SELECTORS: string[];
|
|
9
10
|
export declare const FOOTNOTE_INLINE_REFERENCES: string;
|
|
10
11
|
export declare const FOOTNOTE_LIST_SELECTORS: string;
|
package/dist/defuddle.d.ts
CHANGED
|
@@ -21,8 +21,9 @@ export declare class Defuddle {
|
|
|
21
21
|
private removeClutter;
|
|
22
22
|
private flattenDivs;
|
|
23
23
|
private cleanContent;
|
|
24
|
+
private standardizeSpaces;
|
|
24
25
|
private removeTrailingHeadings;
|
|
25
|
-
private
|
|
26
|
+
private standardizeHeadings;
|
|
26
27
|
private removeHtmlComments;
|
|
27
28
|
private stripUnwantedAttributes;
|
|
28
29
|
private removeEmptyElements;
|