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

[MD] extendDefaultPlugins to preserve default remark plugins #4474

Merged
merged 13 commits into from
Aug 25, 2022

Conversation

bholmesdev
Copy link
Contributor

@bholmesdev bholmesdev commented Aug 25, 2022

Changes

Add extendDefaultPlugins to preserve default markdown plugins:

// astro.config.mjs
export default {
  markdown: {
    remarkPlugins: [myCoolPlugin],
    // preserves GitHub-flavored markdown and smartypants
    extendDefaultPlugins: true,
  }
}

Testing

Add remark plugin tests with and without extends

Docs

withastro/docs#1409

@changeset-bot
Copy link

changeset-bot bot commented Aug 25, 2022

🦋 Changeset detected

Latest commit: 52a6dfa

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) feat: markdown Related to Markdown (scope) labels Aug 25, 2022
@bholmesdev bholmesdev added the semver: minor Change triggers a `minor` release label Aug 25, 2022
@matthewp
Copy link
Contributor

Please don't merge until after #4453 goes out. I'll review after that release is complete.

@bholmesdev bholmesdev changed the title [MD] extends to preserve default remark plugins [MD] extendDefaultPlugins to preserve default remark plugins Aug 25, 2022
bholmesdev and others added 2 commits August 25, 2022 17:02
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Copy link
Member

@FredKSchott FredKSchott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API looks good! Didn't have time to review the code deeply, but assuming others have done that in their review then you've got the LGTM from me!

@matthewp matthewp merged commit ac03218 into main Aug 25, 2022
@matthewp matthewp deleted the feat/md-plugin-extends branch August 25, 2022 21:21
This was referenced Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants