@readme/markdown 6.75.0-beta.13 → 6.75.0-beta.14
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/components/Callout/index.tsx +2 -2
- package/dist/main.js +5 -8
- package/dist/main.node.js +5 -8
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ interface Props extends React.PropsWithChildren<React.HTMLAttributes<HTMLQuoteEl
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const Callout = (props: Props) => {
|
|
11
|
-
const { attributes, theme, icon, heading } = props;
|
|
11
|
+
const { attributes, children, theme, icon, heading } = props;
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
// @ts-ignore
|
|
@@ -19,7 +19,7 @@ const Callout = (props: Props) => {
|
|
|
19
19
|
{heading}
|
|
20
20
|
</h3>
|
|
21
21
|
)}
|
|
22
|
-
{
|
|
22
|
+
{children}
|
|
23
23
|
</blockquote>
|
|
24
24
|
);
|
|
25
25
|
};
|
package/dist/main.js
CHANGED
|
@@ -57940,14 +57940,14 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
57940
57940
|
};
|
|
57941
57941
|
|
|
57942
57942
|
var Callout = function (props) {
|
|
57943
|
-
var attributes = props.attributes, theme = props.theme, icon = props.icon, heading = props.heading;
|
|
57943
|
+
var attributes = props.attributes, children = props.children, theme = props.theme, icon = props.icon, heading = props.heading;
|
|
57944
57944
|
return (
|
|
57945
57945
|
// @ts-ignore
|
|
57946
57946
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("blockquote", __assign({}, attributes, { className: "callout callout_".concat(theme), theme: icon }),
|
|
57947
57947
|
heading && (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("h3", { className: "callout-heading".concat(heading ? '' : ' empty') },
|
|
57948
57948
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { className: "callout-icon" }, icon),
|
|
57949
57949
|
heading)),
|
|
57950
|
-
|
|
57950
|
+
children));
|
|
57951
57951
|
};
|
|
57952
57952
|
Callout.sanitize = function (sanitizeSchema) {
|
|
57953
57953
|
sanitizeSchema.attributes['rdme-callout'] = ['icon', 'theme', 'heading'];
|
|
@@ -58670,19 +58670,16 @@ var calloutTransformer = function () {
|
|
|
58670
58670
|
var _a = startText.match(callouts_regex) || [], match = _a[0], icon = _a[1];
|
|
58671
58671
|
if (icon && match) {
|
|
58672
58672
|
var heading = startText.slice(match.length);
|
|
58673
|
-
|
|
58674
|
-
|
|
58673
|
+
node.children.shift();
|
|
58674
|
+
node.type = 'rdme-callout';
|
|
58675
|
+
node.data = {
|
|
58675
58676
|
hName: 'Callout',
|
|
58676
58677
|
hProperties: {
|
|
58677
58678
|
heading: heading,
|
|
58678
|
-
value: body,
|
|
58679
58679
|
icon: icon,
|
|
58680
58680
|
theme: themes[icon] || 'default',
|
|
58681
58681
|
},
|
|
58682
58682
|
};
|
|
58683
|
-
node.type = 'rdme-callout';
|
|
58684
|
-
node.data = data;
|
|
58685
|
-
node.children[0].children[0].value = startText.slice(match.length);
|
|
58686
58683
|
}
|
|
58687
58684
|
}
|
|
58688
58685
|
catch (e) {
|
package/dist/main.node.js
CHANGED
|
@@ -59541,14 +59541,14 @@ var __assign = (undefined && undefined.__assign) || function () {
|
|
|
59541
59541
|
};
|
|
59542
59542
|
|
|
59543
59543
|
var Callout = function (props) {
|
|
59544
|
-
var attributes = props.attributes, theme = props.theme, icon = props.icon, heading = props.heading;
|
|
59544
|
+
var attributes = props.attributes, children = props.children, theme = props.theme, icon = props.icon, heading = props.heading;
|
|
59545
59545
|
return (
|
|
59546
59546
|
// @ts-ignore
|
|
59547
59547
|
react.createElement("blockquote", __assign({}, attributes, { className: "callout callout_".concat(theme), theme: icon }),
|
|
59548
59548
|
heading && (react.createElement("h3", { className: "callout-heading".concat(heading ? '' : ' empty') },
|
|
59549
59549
|
react.createElement("span", { className: "callout-icon" }, icon),
|
|
59550
59550
|
heading)),
|
|
59551
|
-
|
|
59551
|
+
children));
|
|
59552
59552
|
};
|
|
59553
59553
|
Callout.sanitize = function (sanitizeSchema) {
|
|
59554
59554
|
sanitizeSchema.attributes['rdme-callout'] = ['icon', 'theme', 'heading'];
|
|
@@ -60203,19 +60203,16 @@ var calloutTransformer = function () {
|
|
|
60203
60203
|
var _a = startText.match(callouts_regex) || [], match = _a[0], icon = _a[1];
|
|
60204
60204
|
if (icon && match) {
|
|
60205
60205
|
var heading = startText.slice(match.length);
|
|
60206
|
-
|
|
60207
|
-
|
|
60206
|
+
node.children.shift();
|
|
60207
|
+
node.type = 'rdme-callout';
|
|
60208
|
+
node.data = {
|
|
60208
60209
|
hName: 'Callout',
|
|
60209
60210
|
hProperties: {
|
|
60210
60211
|
heading: heading,
|
|
60211
|
-
value: body,
|
|
60212
60212
|
icon: icon,
|
|
60213
60213
|
theme: themes[icon] || 'default',
|
|
60214
60214
|
},
|
|
60215
60215
|
};
|
|
60216
|
-
node.type = 'rdme-callout';
|
|
60217
|
-
node.data = data;
|
|
60218
|
-
node.children[0].children[0].value = startText.slice(match.length);
|
|
60219
60216
|
}
|
|
60220
60217
|
}
|
|
60221
60218
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@readme/markdown",
|
|
3
3
|
"description": "ReadMe's React-based Markdown parser",
|
|
4
4
|
"author": "Rafe Goldberg <rafe@readme.io>",
|
|
5
|
-
"version": "6.75.0-beta.
|
|
5
|
+
"version": "6.75.0-beta.14",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"browser": "dist/main.js",
|