@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.cjs
CHANGED
|
@@ -10812,8 +10812,9 @@ function ContentRenderer({
|
|
|
10812
10812
|
[instanceExtensions]
|
|
10813
10813
|
);
|
|
10814
10814
|
const html = react.useMemo(() => {
|
|
10815
|
-
const
|
|
10816
|
-
const
|
|
10815
|
+
const safe = value ?? "";
|
|
10816
|
+
const resolvedFormat = format === "auto" ? detectFormat(safe) : format;
|
|
10817
|
+
const raw = resolvedFormat === "markdown" ? marked.marked.parse(safe, { async: false }) : safe;
|
|
10817
10818
|
return unsafe ? raw : sanitizeHtml(raw);
|
|
10818
10819
|
}, [value, format, unsafe]);
|
|
10819
10820
|
const hasExtensions = extensions.length > 0;
|