-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attempt to extract markdown + add syntax highlighting
- Loading branch information
Showing
6 changed files
with
35 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { cn } from '@/lib/utils' | ||
import BaseMarkdown from 'react-markdown' | ||
|
||
import rehypeHighlight from 'rehype-highlight' | ||
|
||
export function Markdown({ | ||
children, | ||
}: { | ||
children: string | ||
components?: Record<string, React.ComponentType> | ||
}) { | ||
return ( | ||
<BaseMarkdown | ||
className={cn( | ||
'col-span-8 prose dark:prose-invert prose-purple max-w-none', | ||
'border-r border-muted pl-4 pt-6 pr-6 pb-10', | ||
'zwj-hide', | ||
)} | ||
// components={{ code }} | ||
skipHtml={true} | ||
rehypePlugins={[rehypeHighlight]} | ||
> | ||
{children} | ||
</BaseMarkdown> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './Markdown' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,15 @@ | |
"name": "readitlater", | ||
"author": "Rohan Nair <[email protected]>", | ||
"license": "AGPL-3.0-only", | ||
"workspaces": [ | ||
"packages/*", | ||
"apps/*" | ||
], | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"dev": "bun --filter '*' dev" | ||
}, | ||
"trustedDependencies": [ | ||
"@tensorflow/tfjs-node" | ||
], | ||
"packageManager": "[email protected]" | ||
"workspaces": [ | ||
"packages/*", | ||
"apps/*" | ||
] | ||
} |