Skip to content

Commit

Permalink
fix: skip malformed trigger_string markdown (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
peppescg authored Jan 13, 2025
1 parent fb5ebf5 commit 79d59c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export function Markdown({ children, className = "" }: Props) {
<ReactMarkdown
components={{
code({ className, children, ...props }) {
if (!children) return null;
const detectedLanguage =
hljs.highlightAuto(children, LANGUAGES_SUBSET_DETECTION).language ??
"plaintext";
Expand Down

0 comments on commit 79d59c5

Please sign in to comment.