@readme/markdown 6.35.0 → 6.36.0

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 CHANGED
@@ -59,5 +59,5 @@ To make changes to the RDMD engine locally is to run the local development serve
59
59
 
60
60
  ## Credits
61
61
 
62
- - **Lisence**: MIT
62
+ - **License**: MIT
63
63
  - **Authors**: [Dom Harrington](https://github.com/domharrington/), [Rafe Goldberg](https://github.com/rafegoldberg)
@@ -49,7 +49,9 @@ function Code(props) {
49
49
  tokenizeVariables: true,
50
50
  dark: theme === 'dark',
51
51
  };
52
- const codeContent = syntaxHighlighter ? syntaxHighlighter(children[0], language, codeOpts) : children[0];
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).isRequired,
81
+ children: PropTypes.arrayOf(PropTypes.string),
80
82
  className: PropTypes.string,
81
83
  copyButtons: PropTypes.bool,
82
84
  lang: PropTypes.string,