Skip to content

Commit f993a6e

Browse files
committed
fix: Fixed children wasn't string
1 parent 2d35a44 commit f993a6e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dist/assets/index-DDXOjVhH.js renamed to dist/assets/index-DB6UUXt7.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<meta name="keyword" content="چیت‌شیت,چیت شیت,راهنما, لاراول,laravel,laravel guide,برگه تقلب,cheat sheet, laravel cheatsheet">
1616
<meta property="og:type" content="website">
1717
<meta property="og:image" content="/favicon.ico">
18-
<script type="module" crossorigin src="/assets/index-DDXOjVhH.js"></script>
18+
<script type="module" crossorigin src="/assets/index-DB6UUXt7.js"></script>
1919
<link rel="stylesheet" crossorigin href="/assets/index-Bnm5Wat6.css">
2020
</head>
2121
<body>

src/components/Codeblock.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import '../lib/highlightjs/styles/github-dark.min.css';
44
import php from 'highlight.js/lib/languages/php';
55
import { isNullOrEmpty } from '../lib/utils';
66

7-
const Codeblock = ({ hasHighlight = true, language = '', isLineNumberDisabled = false, children = 'hey' }) => {
7+
const Codeblock = ({ hasHighlight = true, language = '', isLineNumberDisabled = false, children}) => {
88
if (hasHighlight === false)
99
return (<span className='font-[monospace]'>{children}</span>)
1010

11-
if (!isNullOrEmpty(children))
12-
children = children.replace(/^\s*[\r\n]+|[\r\n]+\s*$/g, '').replace(/^[ \t]+/gm, '');
11+
if (!isNullOrEmpty(children.toString()))
12+
children = children.toString().replace(/^\s*[\r\n]+|[\r\n]+\s*$/g, '').replace(/^[ \t]+/gm, '');
1313

1414
const codeRef = useRef(null);
1515

0 commit comments

Comments
 (0)