@readme/markdown 6.35.0 → 6.35.1-next.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/components/Code/index.jsx +4 -2
- package/dist/main.js +2 -2
- package/dist/main.node.js +2 -2
- package/package.json +2 -2
|
@@ -49,7 +49,9 @@ function Code(props) {
|
|
|
49
49
|
tokenizeVariables: true,
|
|
50
50
|
dark: theme === 'dark',
|
|
51
51
|
};
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
const codeContent =
|
|
54
|
+
syntaxHighlighter && children ? syntaxHighlighter(children[0], language, codeOpts) : children?.[0] || '';
|
|
53
55
|
|
|
54
56
|
return (
|
|
55
57
|
<React.Fragment>
|
|
@@ -76,7 +78,7 @@ function CreateCode(sanitizeSchema, { copyButtons, theme }) {
|
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
Code.propTypes = {
|
|
79
|
-
children: PropTypes.arrayOf(PropTypes.string)
|
|
81
|
+
children: PropTypes.arrayOf(PropTypes.string),
|
|
80
82
|
className: PropTypes.string,
|
|
81
83
|
copyButtons: PropTypes.bool,
|
|
82
84
|
lang: PropTypes.string,
|
package/dist/main.js
CHANGED
|
@@ -9342,7 +9342,7 @@ function Code(props) {
|
|
|
9342
9342
|
tokenizeVariables: true,
|
|
9343
9343
|
dark: theme === 'dark'
|
|
9344
9344
|
};
|
|
9345
|
-
var codeContent = syntaxHighlighter ? syntaxHighlighter(children[0], language, codeOpts) : children[0];
|
|
9345
|
+
var codeContent = syntaxHighlighter && children ? syntaxHighlighter(children[0], language, codeOpts) : (children === null || children === void 0 ? void 0 : children[0]) || '';
|
|
9346
9346
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("code", {
|
|
9347
9347
|
ref: codeRef,
|
|
9348
9348
|
className: ['rdmd-code', "lang-".concat(language), "theme-".concat(theme)].join(' '),
|
|
@@ -9370,7 +9370,7 @@ function CreateCode(sanitizeSchema, _ref2) {
|
|
|
9370
9370
|
}
|
|
9371
9371
|
|
|
9372
9372
|
Code.propTypes = {
|
|
9373
|
-
children: PropTypes.arrayOf(PropTypes.string)
|
|
9373
|
+
children: PropTypes.arrayOf(PropTypes.string),
|
|
9374
9374
|
className: PropTypes.string,
|
|
9375
9375
|
copyButtons: PropTypes.bool,
|
|
9376
9376
|
lang: PropTypes.string,
|
package/dist/main.node.js
CHANGED
|
@@ -9342,7 +9342,7 @@ function Code(props) {
|
|
|
9342
9342
|
tokenizeVariables: true,
|
|
9343
9343
|
dark: theme === 'dark'
|
|
9344
9344
|
};
|
|
9345
|
-
var codeContent = syntaxHighlighter ? syntaxHighlighter(children[0], language, codeOpts) : children[0];
|
|
9345
|
+
var codeContent = syntaxHighlighter && children ? syntaxHighlighter(children[0], language, codeOpts) : (children === null || children === void 0 ? void 0 : children[0]) || '';
|
|
9346
9346
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("code", {
|
|
9347
9347
|
ref: codeRef,
|
|
9348
9348
|
className: ['rdmd-code', "lang-".concat(language), "theme-".concat(theme)].join(' '),
|
|
@@ -9370,7 +9370,7 @@ function CreateCode(sanitizeSchema, _ref2) {
|
|
|
9370
9370
|
}
|
|
9371
9371
|
|
|
9372
9372
|
Code.propTypes = {
|
|
9373
|
-
children: PropTypes.arrayOf(PropTypes.string)
|
|
9373
|
+
children: PropTypes.arrayOf(PropTypes.string),
|
|
9374
9374
|
className: PropTypes.string,
|
|
9375
9375
|
copyButtons: PropTypes.bool,
|
|
9376
9376
|
lang: PropTypes.string,
|
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.35.
|
|
5
|
+
"version": "6.35.1-next.1",
|
|
6
6
|
"main": "dist/main.node.js",
|
|
7
7
|
"browser": "dist/main.js",
|
|
8
8
|
"files": [
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"node-sass": "^6.0.1",
|
|
94
94
|
"prettier": "^2.5.0",
|
|
95
95
|
"puppeteer": "^12.0.1",
|
|
96
|
-
"rdme": "^6.0.
|
|
96
|
+
"rdme": "^6.0.1",
|
|
97
97
|
"react": "^16.14.0",
|
|
98
98
|
"react-dom": "^16.14.0",
|
|
99
99
|
"react-hot-loader": "^4.13.0",
|