html-react-parser 5.1.11 → 5.1.13
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/html-react-parser.js +5 -5
- package/dist/html-react-parser.js.map +1 -1
- package/dist/html-react-parser.min.js +1 -1
- package/dist/html-react-parser.min.js.map +1 -1
- package/esm/index.mjs +3 -3
- package/esm/utilities.mjs +3 -3
- package/lib/attributes-to-props.d.ts.map +1 -1
- package/lib/attributes-to-props.js.map +1 -1
- package/lib/dom-to-react.d.ts +1 -1
- package/lib/dom-to-react.d.ts.map +1 -1
- package/lib/dom-to-react.js.map +1 -1
- package/lib/utilities.d.ts.map +1 -1
- package/lib/utilities.js +1 -0
- package/lib/utilities.js.map +1 -1
- package/package.json +19 -14
- package/src/attributes-to-props.ts +2 -1
- package/src/dom-to-react.ts +5 -6
- package/src/utilities.ts +2 -1
package/README.md
CHANGED
|
@@ -401,7 +401,7 @@ parse('<br>', {
|
|
|
401
401
|
### htmlparser2
|
|
402
402
|
|
|
403
403
|
> [!WARNING]
|
|
404
|
-
> `htmlparser2` options _**don't work** on the client-side_ (browser)
|
|
404
|
+
> `htmlparser2` options _**don't work** on the client-side_ (browser); they _**only work** on the server-side_ (Node.js). By overriding the options, it can break universal rendering.
|
|
405
405
|
|
|
406
406
|
Default [htmlparser2 options](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode) can be overridden in >=[0.12.0](https://github.com/remarkablemark/html-react-parser/tree/v0.12.0).
|
|
407
407
|
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
var domparser$1 = {};
|
|
33
33
|
|
|
34
34
|
Object.defineProperty(domparser$1, "__esModule", { value: true });
|
|
35
|
+
domparser$1.default = domparser;
|
|
35
36
|
// constants
|
|
36
37
|
var HTML = 'html';
|
|
37
38
|
var HEAD = 'head';
|
|
@@ -166,7 +167,6 @@
|
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
|
-
domparser$1.default = domparser;
|
|
170
170
|
|
|
171
171
|
var utilities$2 = {};
|
|
172
172
|
|
|
@@ -925,7 +925,8 @@
|
|
|
925
925
|
} (constants));
|
|
926
926
|
|
|
927
927
|
Object.defineProperty(utilities$2, "__esModule", { value: true });
|
|
928
|
-
utilities$2.
|
|
928
|
+
utilities$2.formatAttributes = formatAttributes;
|
|
929
|
+
utilities$2.formatDOM = formatDOM;
|
|
929
930
|
var domhandler_1 = lib$2;
|
|
930
931
|
var constants_1 = constants;
|
|
931
932
|
/**
|
|
@@ -954,7 +955,6 @@
|
|
|
954
955
|
}
|
|
955
956
|
return map;
|
|
956
957
|
}
|
|
957
|
-
utilities$2.formatAttributes = formatAttributes;
|
|
958
958
|
/**
|
|
959
959
|
* Corrects the tag name if it is case-sensitive (SVG).
|
|
960
960
|
* Otherwise, returns the lowercase tag name (HTML).
|
|
@@ -1030,12 +1030,12 @@
|
|
|
1030
1030
|
}
|
|
1031
1031
|
return domNodes;
|
|
1032
1032
|
}
|
|
1033
|
-
utilities$2.formatDOM = formatDOM;
|
|
1034
1033
|
|
|
1035
1034
|
var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
1036
1035
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1037
1036
|
};
|
|
1038
1037
|
Object.defineProperty(htmlToDom, "__esModule", { value: true });
|
|
1038
|
+
htmlToDom.default = HTMLDOMParser;
|
|
1039
1039
|
var domparser_1 = __importDefault$3(domparser$1);
|
|
1040
1040
|
var utilities_1$3 = utilities$2;
|
|
1041
1041
|
var DIRECTIVE_REGEX = /<(![a-zA-Z\s]+)>/; // e.g., <!doctype html>
|
|
@@ -1057,7 +1057,6 @@
|
|
|
1057
1057
|
var directive = match ? match[1] : undefined;
|
|
1058
1058
|
return (0, utilities_1$3.formatDOM)((0, domparser_1.default)(html), null, directive);
|
|
1059
1059
|
}
|
|
1060
|
-
htmlToDom.default = HTMLDOMParser;
|
|
1061
1060
|
|
|
1062
1061
|
var attributesToProps$1 = {};
|
|
1063
1062
|
|
|
@@ -2516,6 +2515,7 @@
|
|
|
2516
2515
|
}
|
|
2517
2516
|
try {
|
|
2518
2517
|
props.style = (0, style_to_js_1.default)(style, styleOptions);
|
|
2518
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2519
2519
|
}
|
|
2520
2520
|
catch (error) {
|
|
2521
2521
|
props.style = {};
|