From cf010b999c4e0437883614360cb6c4bbf654f143 Mon Sep 17 00:00:00 2001 From: Gunesh Pinar Date: Sat, 12 Dec 2020 22:35:37 -0800 Subject: [PATCH] Preview Plain Text for Unrecognized Languages --- src/components/atoms/MarkdownPreviewer.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/atoms/MarkdownPreviewer.tsx b/src/components/atoms/MarkdownPreviewer.tsx index ccdbdd6d35..e3648c4663 100644 --- a/src/components/atoms/MarkdownPreviewer.tsx +++ b/src/components/atoms/MarkdownPreviewer.tsx @@ -114,6 +114,8 @@ function rehypeCodeMirrorAttacher(options: Partial) { }) } else if (!ignoreMissing) { throw new Error(`Unknown language: \`${lang}\` is not registered`) + } else { + return; } }