Skip to content

Commit

Permalink
πŸ› Fix widgets so they don't render as text
Browse files Browse the repository at this point in the history
See #109
  • Loading branch information
rowanc1 committed Mar 15, 2023
1 parent fc6831d commit 5269c45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inlineExpression.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ export function InlineRenderer({ value }: { value?: string }): JSX.Element {
}

// Explicitly render text/plain
const preferredMimeType = rendermime.preferredMimeType(mimeBundle ?? {});
if (preferredMimeType === 'text/plain') {
const preferred = rendermime.preferredMimeType(mimeBundle ?? {}, 'any');
if (preferred === 'text/plain') {
return <PlainTextRenderer content={mimeBundle?.['text/plain'] as string} />;
}
// Explicitly render errors
Expand Down

0 comments on commit 5269c45

Please sign in to comment.