@sinm/prism-line-break
v1.1.0
Published
prism line break
Downloads
5
Readme
Prism Line Break
Installation
npm install @sinm/prism-line-break
Usage
import Prism from 'prismjs/components/prism-core';
import 'prismjs/plugins/line-numbers/prism-line-numbers';
import 'prismjs/plugins/line-numbers/prism-line-numbers.css';
import lineBreak from '@sinm/prism-line-break';
/**
* <pre class="line-numbers">
* <code class="language-js">
* ...
* </code>
* </pre>
*/
const code = document.queySelect('code');
Prism.highlightElement(codeRef.current);
setTimeout(() => lineBreak(code), 0);