Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setParserPlugins doesn't take plugin options #3280

Closed
AlahmadiQ8 opened this issue Dec 20, 2017 · 3 comments
Closed

setParserPlugins doesn't take plugin options #3280

AlahmadiQ8 opened this issue Dec 20, 2017 · 3 comments

Comments

@AlahmadiQ8
Copy link

Description

I'm trying to use remark-custom-blocks. However I am unable to find a way to pass in required plugin options. I looked at #706 but still no luck.

See how the plugin is used below

  remark.use(remarkCustomBlocks, {
    someType: 'a-css-class another-class',
    anotherType: 'foo',
  })

I have tried the following, but no luck unfortunately

module.exports.setParserPlugins = () => [
  function customRemark() {
    return remarkCustomBlocks({
      danger: 'danger',
      info: 'info',
    });
  },
];

Is there a way to pass parser option arguments?

Perhaps we could change

for (let parserPlugin of requiredPlugin.setParserPlugins()) {
to also take parser plugin options?

Environment

Gatsby version: 1.1.20
Node.js version: v8.5.0

@KyleAMathews
Copy link
Contributor

Hey sure! That totally makes sense and seems like it was an oversight not adding that originally.

Would you like to create a PR for this?

A plugin for remark-custom-blocks would be 💯 too :-)

@AlahmadiQ8
Copy link
Author

Absolutely :). I'll work on a PR tonight.

@KyleAMathews
Copy link
Contributor

Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants