Bugfix/extra whitespace in code #12570
Open
+9
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!