Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
fix: markdown not highlighted correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ijsKoud committed May 4, 2023
1 parent 4f05a34 commit 7b494d3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apps/web/src/pages/bins/[id]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Markdown from "@paperplane/markdown";
import { getProtocol } from "@paperplane/utils";
import axios from "axios";
import type { GetServerSideProps, NextPage } from "next";
Expand Down Expand Up @@ -39,9 +40,13 @@ const Pastebin: NextPage<Props> = ({ data, highlight, id }) => {
return (
<div className="w-screen min-h-screen">
<NextSeo title={`pastebin • ${id}`} />
<SyntaxHighlighter style={atomOneDark} language={highlight} showLineNumbers>
{data}
</SyntaxHighlighter>
{highlight === "markdown" ? (
<Markdown>{data}</Markdown>
) : (
<SyntaxHighlighter style={atomOneDark} language={highlight} showLineNumbers>
{data}
</SyntaxHighlighter>
)}
</div>
);
};
Expand Down

1 comment on commit 7b494d3

@ijsKoud
Copy link
Owner Author

@ijsKoud ijsKoud commented on 7b494d3 May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ijsblokjeee[bot] release v4.1.6

Please sign in to comment.