mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
chore: not opening in new tab
This commit is contained in:
parent
dd150eb3e5
commit
59f6477719
@ -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 (
|
||||
<div className='markdown-body w-full'>
|
||||
<MarkdownView
|
||||
@ -21,6 +21,7 @@ const Markdown = ({ text }: MarkdownProps): JSX.Element => {
|
||||
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
|
||||
|
||||
@ -27,7 +27,7 @@ const Docs: NextPage<DocsProps> = ({ docs }) => {
|
||||
if((!document) || router.query.docs?.length > 2) return <NotFound />
|
||||
return <DeveloperLayout enabled='docs' docs={docs} currentDoc={(router.query.second || router.query.first) as string}>
|
||||
<div className='px-2 no-seg'>
|
||||
<Markdown text={document?.text} />
|
||||
<Markdown text={document?.text} options={{ openLinksInNewWindow: false }}/>
|
||||
</div>
|
||||
</DeveloperLayout>
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user