v4.2.0
Documentation v4.2.0: https://raw.githack.com/uiwjs/react-markdown-preview/7ba1829/index.html
Comparing Changes: v4.1.16...v4.2.0
- π feat: add no highlight component. 2836e47 @jaywcjlove
- β test: fix test case error. 2269435 @jaywcjlove
npm i @uiw/react-markdown-preview@4.2.0
Remove Code Highlight
The following example can help you exclude code highlighting code from being included in the bundle. @uiw/react-markdown-preview/nohighlight
component does not contain the rehype-prism-plus
code highlighting package, showLineNumbers
and highlight line
functions will no longer work. (#586)
import React from 'react';
import MarkdownPreview from '@uiw/react-markdown-preview/nohighlight';
const source = `
\`\`\`js
function () {
console.log('hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello')
}
\`\`\`
\`\`\`js
function () {
console.log('hello ')
}
\`\`\`
`;
export default function Demo() {
return (
<MarkdownPreview
source={source}
/>
);
}