Skip to content

Commit

Permalink
fix simple markdown and distinguish fromlive markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Irene Alvarado committed Nov 23, 2021
1 parent 5b67438 commit 9b838e1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"id": "simple-markdown-block",
"title": "Markdown block",
"description": "A simple markdown block",
"entry": "/src/blocks/file-blocks/markdown.tsx",
"entry": "/src/blocks/file-blocks/simple-markdown/markdown.tsx",
"extensions": [
"md"
]
Expand All @@ -118,7 +118,7 @@
"id": "live-markdown-block",
"title": "Live Markdown",
"description": "View rich markdown files",
"entry": "/src/blocks/file-blocks/markdown/index.tsx",
"entry": "/src/blocks/file-blocks/live-markdown/index.tsx",
"extensions": [
"md"
]
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions src/blocks/file-blocks/simple-markdown/markdown.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { FileBlockProps } from '@githubnext/utils';
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'

import './markdown.css';

export default function (props: FileBlockProps) {
const { content } = props;

return (
<ReactMarkdown children={content} remarkPlugins={[remarkGfm]} />
<ReactMarkdown className="markdown-body" children={content} remarkPlugins={[remarkGfm]} />
);
}

0 comments on commit 9b838e1

Please sign in to comment.