question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to work with remark-highlight.js?

See original GitHub issue

Trying to use remark-highlight.js:

{
	mdPlugins: [
		require('remark-highlight.js')
	]
}

But what I got is:

2018-05-02 1 51 49

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wooormcommented, Nov 28, 2018

Hey folks! tip: use hastPlugins with rehype-highlight (lowlight) or @mapbox/rehype-prism (refractor) instead!

There are some slight differences and I’d suggest using the rehype versions above remark versions!

1reaction
mununkicommented, Nov 28, 2018

@trevordmiller Great helps! It helps me a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

remark-highlight.js - GitHub
Please use remark-rehype to move from remark (markdown) to rehype (HTML) and then replace remark-highlight.js with rehype-highlight .
Read more >
remark-highlight.js - npm
Legacy remark plugin to highlight code blocks with highlight.js ... Start using remark-highlight.js in your project by running `npm i ...
Read more >
remark-highlight.js - unified
Please use remark-rehype to move from remark (markdown) to rehype (HTML) and then replace remark-highlight.js with rehype-highlight .
Read more >
How to use highlight.js
// first, find all the div.code blocks document.querySelectorAll('div.code').forEach(el => { // then highlight each hljs.highlightElement(el); });.
Read more >
Markdown Syntax Highlighting with PrismJS using Unified ...
We'll explore how to use Unified, Remark, Rehype, and PrismJS to create ... I found that highlightjs has more support and examples but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found