fix syntax highlighting warnings
This commit is contained in:
parent
566e3f427b
commit
7490e5c249
@ -127,10 +127,10 @@ export default memo(function Text ({ topLevel, noFragments, nofollow, onlyImgPro
|
|||||||
<table className='table table-bordered table-sm' {...props} />
|
<table className='table table-bordered table-sm' {...props} />
|
||||||
</span>,
|
</span>,
|
||||||
p: ({ children, ...props }) => <div className={styles.p} {...props}>{children}</div>,
|
p: ({ children, ...props }) => <div className={styles.p} {...props}>{children}</div>,
|
||||||
code ({ node, inline, className, children, ...props }) {
|
code ({ node, inline, className, children, style, ...props }) {
|
||||||
return !inline
|
return !inline
|
||||||
? (
|
? (
|
||||||
<SyntaxHighlighter showLineNumbers style={atomDark} PreTag='div'>
|
<SyntaxHighlighter showLineNumbers style={atomDark} PreTag='div' {...props}>
|
||||||
{reactStringReplace(String(children).replace(/\n$/, ''), /:high\[([^\]]+)\]/g, (match, i) => {
|
{reactStringReplace(String(children).replace(/\n$/, ''), /:high\[([^\]]+)\]/g, (match, i) => {
|
||||||
return match
|
return match
|
||||||
}).join('')}
|
}).join('')}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user