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

Change gatsby-transformer-remark excerpt behavior #14723

Merged

Conversation

riywo
Copy link
Contributor

@riywo riywo commented Jun 12, 2019

Description

This commit changes excerpt behavior of gatsby-transformer-remark:

  • Plain text even with separator
  • New format for MARKDOWN

Previously, PLAIN excerpt returns different format with/without excerpt_separator because it respected gray-matter's excerpt (which is raw markdown) when excerpt_separator is specified. Now, it applies the same logic used by without separator.

To keep the current behavior somewhere, we also introduces MARKDOWN format. So, excerpt(format: MARKDOWN) + excerpt_separator is identical with the current excerpt(format: PLAIN) + excerpt_separator.

Related Issues

Addresses #4459

- Plain text even with separator
- New format for MARKDOWN
@riywo
Copy link
Contributor Author

riywo commented Jun 12, 2019

I have no idea why some of tests are failing.

@freiksenet
Copy link
Contributor

There was a stale snapshot (happens sometimes when writing tests). I've removed it now.

I'll merge it and release as a minor version update for the plugin, thanks a lot!

@freiksenet freiksenet merged commit 4f72687 into gatsbyjs:master Jun 14, 2019
@gatsbot
Copy link

gatsbot bot commented Jun 14, 2019

Holy buckets, @riywo — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

@freiksenet
Copy link
Contributor

Published as 2.4.0. Thank as a lot! 💜 💪

@riywo
Copy link
Contributor Author

riywo commented Jun 14, 2019

OMG, thank you so much!!!

@riywo riywo deleted the issues/remark-excerpt_separator-with-plain branch June 14, 2019 10:10
mxxk pushed a commit to mxxk/gatsby that referenced this pull request Jun 21, 2019
)

Change gatsby-transformer-remark excerpt behavior

- Plain text even with separator
- New format for MARKDOWN
@zslabs
Copy link
Contributor

zslabs commented Jul 2, 2019

cc @wardpeet #15286

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

Successfully merging this pull request may close these issues.

3 participants