Eyas / md-heading-id

Support for Heading ID Markdown Extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using with remark-lint

nzjoel1234 opened this issue · comments

commented

I am able to use your plugin with next-mdx-remote like so:

      remarkPlugins: [
        remarkGfm,
        remarkHeadingId,

This works fine and renders to HTML correctly etc.

But when trying to run with remark-lint with the following in my remarkConfig:

    "plugins": [
      "remark-gfm",
      "remark-custom-heading-id",

I am getting error Parsing error: Could not parse expression with acorn: Unexpected character '#'

commented

Could this problem be caused by the plugin not being the default export of the package? (i.e. other remark plugins are typically imported like this import remarkGfm from 'remark-grm' whereas this package needs to be imported like this import { remarkHeadingId } from 'remark-custom-heading-id

commented

I modified your code inside my node_modules folder and found that adding export default remarkHeadingId; to the end of index.js DID work.

I have not done a pull request before and am not 100% sure of the process and am wondering if I should bother for such a small change?

Are you able to make this change or would you prefer a pull request?

Thanks