feat: tab link component, edit wrapper

This commit is contained in:
Danny Avila 2023-03-10 13:12:24 -05:00
parent cdbe00ec6f
commit fc2b9bf7f2

View file

@ -1,11 +1,23 @@
import React from 'react'; import React from 'react';
import TabLink from './TabLink';
import Markdown from 'markdown-to-jsx'; import Markdown from 'markdown-to-jsx';
import Embed from './Embed'; import Embed from './Embed';
import Highlight from './Highlight'; import Highlight from './Highlight';
import regexSplit from '~/utils/regexSplit'; import regexSplit from '~/utils/regexSplit';
import { wrapperRegex } from '~/utils'; import { wrapperRegex } from '~/utils';
const { codeRegex, inLineRegex, markupRegex, languageMatch, newLineMatch } = wrapperRegex; const { codeRegex, inLineRegex, markupRegex, languageMatch, newLineMatch } = wrapperRegex;
const mdOptions = { wrapper: React.Fragment, forceWrapper: true }; const mdOptions = {
wrapper: React.Fragment,
forceWrapper: true,
overrides: {
a: {
component: TabLink,
// props: {
// className: 'foo'
// }
}
}
};
const inLineWrap = (parts) => { const inLineWrap = (parts) => {
let previousElement = null; let previousElement = null;