How to use line-number plugin with webpack
Open
Nobody has claimed this yet.
plugins
support
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
I hava code link this. But it not show line number
const Prism = require('prismjs/components/prism-core.js');
require('prismjs/plugins/line-numbers/prism-line-numbers.js');
require('prismjs/themes/prism.css');
require('prismjs/components/prism-javascript');
const code = 'var a = 1;';
render() {
<pre className="line-numbers" data-start="0">
<code className="language-javascript" dangerouslySetInnerHTML={{ __html: code }} />
</pre>
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied render snippet with webpack, the listed Prism line-numbers plugin, theme, and JavaScript component. Inspect prismjs/plugins/line-numbers/prism-line-numbers.js and the CSS import; done means the rendered code displays line numbers as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100