-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby-remark-prismjs): Allow global line number config #10076
feat(gatsby-remark-prismjs): Allow global line number config #10076
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! I spotted a sneaky typo:
Co-Authored-By: timbroder <tim@kidfund.us>
@jgierer12 thanks! (oh man the new suggestion features are great) |
Looks good to me! |
Sorry for the close / reopen. Was playing with Githawk and thought it meant close the notification. @jgierer12 I'm not sure what the bootstrap failure is, could you advise? Thanks |
I don't think the failing CI has anything to do with this PR, no need to worry about it. |
@timbroder Could you try to do the following to see if tests pass now?
Thanks! |
…er/gatsby into topics/prism-line-numbers-global
43256bc
to
fda5f94
Compare
@phacks that did it! Thanks! (the first one) |
@jgierer12 what is the next step to merge this? Thanks |
Holy buckets, @timbroder — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
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! |
Sorry, seems like this flew a bit under my radar 😅 Thanks a lot @timbroder 🙌 |
Before publishing this, I have just one potential correction - My preferred solution for this would be to keep previous name of the option and alias it in the function: module.exports = (
{ markdownAST },
{
classPrefix = `language-`,
inlineCodeMarker = null,
aliases = {},
noInlineHighlight = false,
- showLineNumbersGlobal = false,
+ showLineNumbers: showLineNumbersGlobal = false,
} = {}
) => { and adjust readme to use And sorry @timbroder for slow PR handling, I've missed this one too. |
Hi!
First-time contributor, please let me know if I can improve anything!
Line number support for Prism was added in #5821! 🎆 But, it looks like showLineNumbers in the main config isn't used so you can conditionally turn on for specific code blocks when you want it.
This PR turns that high level config back on if you want it. I'm migrating a few hundred posts over from Jekyll and don't want to go through each post turning line numbers on 😸
CC: @phacks (original line number PR)