From 59f6477719f00259163202e44cab06818212c676 Mon Sep 17 00:00:00 2001 From: wonderlandpark Date: Sun, 7 Mar 2021 13:28:56 +0900 Subject: [PATCH] chore: not opening in new tab --- components/Markdown.tsx | 6 +++++- pages/developers/docs/[first]/[second].tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/Markdown.tsx b/components/Markdown.tsx index 05a5a62..93cfa0e 100644 --- a/components/Markdown.tsx +++ b/components/Markdown.tsx @@ -3,7 +3,7 @@ import MarkdownView from 'react-showdown' import sanitizeHtml from 'sanitize-html' import Emoji from 'node-emoji' -const Markdown = ({ text }: MarkdownProps): JSX.Element => { +const Markdown = ({ text, options={} }: MarkdownProps): JSX.Element => { return (
{ tasklists: true, ghCompatibleHeaderId: true, encodeEmails: true, + ...options }} sanitizeHtml={html => sanitizeHtml(html, { @@ -104,6 +105,9 @@ const Markdown = ({ text }: MarkdownProps): JSX.Element => { interface MarkdownProps { text: string + options?: { + [key: string]: boolean + } } export default Markdown diff --git a/pages/developers/docs/[first]/[second].tsx b/pages/developers/docs/[first]/[second].tsx index 1855fc8..11f4d69 100644 --- a/pages/developers/docs/[first]/[second].tsx +++ b/pages/developers/docs/[first]/[second].tsx @@ -27,7 +27,7 @@ const Docs: NextPage = ({ docs }) => { if((!document) || router.query.docs?.length > 2) return return
- +
}