Choi Chan Hwan
Choi Chan Hwan

Reputation: 11

Line highlighting function in Retype-Pretty-Code is not working

https://rehype-pretty-code.netlify.app/

I tried to use the line highlighting function with Rehype-Pretty-Code, but it didn't work.

'data-higlighted-line' is applied to the span class.

The markdown is as follows.

```js {1-3, 4}
import Document, { Html, Head, Main, NextScript } from "next/document";

// 🔥 Super granular and accurate highlighting
export default class MyDocument extends Document {
  static async getInitialProps(ctx) {
    const initialProps = await Document.getInitialProps(ctx);
    return { ...initialProps };
  }

  render() {
    return (
      <Html>
        <Head />
        <body className="bg-zinc-800 text-zinc-200">
          <Main />
          <NextScript />
        </body>
      </Html>
    );
  }
}
```

I hope to solve this problem...

Upvotes: 0

Views: 141

Answers (0)

Related Questions