Skip to content

Commit 79d59c5

Browse files
authored
fix: skip malformed trigger_string markdown (#53)
1 parent fb5ebf5 commit 79d59c5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/Markdown.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export function Markdown({ children, className = "" }: Props) {
5757
<ReactMarkdown
5858
components={{
5959
code({ className, children, ...props }) {
60+
if (!children) return null;
6061
const detectedLanguage =
6162
hljs.highlightAuto(children, LANGUAGES_SUBSET_DETECTION).language ??
6263
"plaintext";

0 commit comments

Comments
 (0)