@sinm/prism-line-break
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i @sinm/prism-line-break

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

4.18 kB

Total Files

5

Last publish

Collaborators

  • pansinm