Skip to content

v4.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 01 Nov 04:52
· 49 commits to master since this release

Documentation v4.2.0: https://raw.githack.com/uiwjs/react-markdown-preview/7ba1829/index.html
Comparing Changes: v4.1.16...v4.2.0

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}
    />
  );
}