mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
Bugfix/extra whitespace in code (#12570)
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
This commit is contained in:
parent
a5b17359c1
commit
87231b1168
2 changed files with 7 additions and 0 deletions
5
.changeset/twelve-pens-remain.md
Normal file
5
.changeset/twelve-pens-remain.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@astrojs/markdown-remark": patch
|
||||
---
|
||||
|
||||
Removes trailing new line in code blocks to prevent generating a trailing empty `<span />` tag
|
|
@ -103,6 +103,8 @@ export async function createShikiHighlighter({
|
|||
}
|
||||
}
|
||||
|
||||
code = code.replace(/(?:\r\n|\r|\n)$/, '');
|
||||
|
||||
const themeOptions = Object.values(themes).length ? { themes } : { theme };
|
||||
const inline = options?.inline ?? false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue