-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Bugfix/extra whitespace in code #12570
Bugfix/extra whitespace in code #12570
Conversation
This is a similar solution as seen in shikijs/shiki#585
🦋 Changeset detectedLatest commit: dae1046 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 |
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.
I think I'd lean on removing the option for now and remove the new line always. It seems like a sensible default. Maybe if there's a reported issue in the future we can re-evaluate adding a new option again.
818f8ac
to
e52591a
Compare
Changes
This fixes the extra line added in the code blocks as reported in #12515 using the same method as seen in shikijs/shiki#585 as suggested by @bluwy
Now this option is enabled by default, same as seen in shiki, but can be disabled trough a option.
Testing
Testing was done manually in my own Astro project and I made sure to run both
pnpm run build
andpnpm run test
to see that this PR had no impact on one of the actions.This change also does not include any new tests in the
@astrojs/markdown-remark
package,since this option works similar to the
wrap
option, which also has no test.Docs
A update to the docs will be needed, since this adds a new option to opt out of this behavior.
/cc @withastro/maintainers-docs for feedback!