Skip to content

Commit

Permalink
feat: markdown support in pdf export (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
gorillamoe authored May 19, 2024
1 parent 4cd2c94 commit c09212f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/PDFDocument.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React, { FC } from 'react';
import { FC } from 'react';
import Markdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { connect } from 'react-redux';
import type { RootState } from './Store'
import { getHMSStringFromSeconds } from './../lib/Utils';
Expand Down Expand Up @@ -58,8 +60,8 @@ const BasicView: FC = (pdfDocument: PDFQueryResult[]) => {
</header>
<div className="card-content">
<div className="content">
<h1>{item.name}</h1>
<p>{item.description}</p>
<p className="subtitle is-6">{item.name}</p>
<Markdown remarkPlugins={[remarkGfm]}>{item.description}</Markdown>
<br />
<time dateTime={item.date}>{item.date}</time>
</div>
Expand Down

0 comments on commit c09212f

Please sign in to comment.