From ce028df672325e2efaef2f9dbee05701328b0924 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 14 Jan 2021 19:54:17 +0300 Subject: feat: allow passing plugins to Markdown --- src/lib/Markdown/Markdown.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/Markdown/Markdown.tsx b/src/lib/Markdown/Markdown.tsx index 32732ec..c0389dc 100644 --- a/src/lib/Markdown/Markdown.tsx +++ b/src/lib/Markdown/Markdown.tsx @@ -14,6 +14,8 @@ interface PropTypes { url?: string; // eslint-disable-next-line @typescript-eslint/no-explicit-any context?: Record; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + plugins?: any[] } const resolveUrls = (line: string, baseUrl: string): string => line.replace( @@ -38,6 +40,7 @@ const Markdown: React.FC = ({ url, source, context = {}, + plugins = [], }) => { const [markdown, setMarkdown] = useState(source || ''); @@ -69,7 +72,7 @@ const Markdown: React.FC = ({ -- cgit v1.2.3