Skip to content

Commit

Permalink
Merge pull request #1768 from czhou578/1758-block
Browse files Browse the repository at this point in the history
Added conditional language formatter check
  • Loading branch information
anth-volk authored May 13, 2024
2 parents c0b8d6c + eb00385 commit a43c37e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/layout/CodeBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,7 @@ export default function CodeBlock({
maxHeight={maxHeight ? maxHeight : !isExpanded && "260px"}
editable={false}
extensions={[
language === "json"
? langs.json()
: language === "markdown"
? langs.markdown()
: langs.json(),
language in langs ? langs[language]() : langs.json(),
EditorView.lineWrapping,
]}
theme={espresso}
Expand Down

0 comments on commit a43c37e

Please sign in to comment.