react-syntax-highlighter
Version:
syntax highlighting component for react with prismjs or highlightjs ast using inline styles
10 lines (7 loc) • 335 B
JavaScript
import highlight from './highlight';
import defaultStyle from './styles/hljs/default-style';
import lowlight from 'lowlight';
import supportedLanguages from './languages/hljs/supported-languages';
const highlighter = highlight(lowlight, defaultStyle);
highlighter.supportedLanguages = supportedLanguages;
export default highlighter;