@particle-academy/react-fancy 3.4.0 → 3.4.1
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/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10791,8 +10791,9 @@ function ContentRenderer({
|
|
|
10791
10791
|
[instanceExtensions]
|
|
10792
10792
|
);
|
|
10793
10793
|
const html = useMemo(() => {
|
|
10794
|
-
const
|
|
10795
|
-
const
|
|
10794
|
+
const safe = value ?? "";
|
|
10795
|
+
const resolvedFormat = format === "auto" ? detectFormat(safe) : format;
|
|
10796
|
+
const raw = resolvedFormat === "markdown" ? marked.parse(safe, { async: false }) : safe;
|
|
10796
10797
|
return unsafe ? raw : sanitizeHtml(raw);
|
|
10797
10798
|
}, [value, format, unsafe]);
|
|
10798
10799
|
const hasExtensions = extensions.length > 0;
|