Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Extra <span class="line"></span> added to code blocks? #101

Closed
5 tasks done
leone6 opened this issue Jan 17, 2024 · 2 comments
Closed
5 tasks done

Extra <span class="line"></span> added to code blocks? #101

leone6 opened this issue Jan 17, 2024 · 2 comments

Comments

@leone6
Copy link

leone6 commented Jan 17, 2024

Describe the bug

hello, first let me say thank you for this interesting library. i am trying to migrate over from rehype-pretty-code but i just ran into an issue and i'm not sure what i'm doing wrong.

i am using nextjs 14, the @next-mdx package, and tailwind. in my mdx files i am writing some code blocks for example documentation. primarily javascript snippets. so the code blocks look like:

something

something else (notice the empty new line above)

the highlighting works perfectly but somewhere along the tree transformation process these extra new lines are being inserted.

any ideas what i'm doing wrong? thanks!

Screenshot 2024-01-16 184241 Screenshot 2024-01-16 184350

Reproduction

see pictures in post

System Info

windows 11, chrome, node v20.9

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@leone6
Copy link
Author

leone6 commented Jan 17, 2024

i forgot one thing- i should also mention that i'm using the rehype-shikiji plugin in the next.config.mjs file. so not sure if this question is related to shikiji or the rehype plugin. thank you

@antfu
Copy link
Owner

antfu commented Jan 17, 2024

We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info.
Please provide a minimal reproduction to reopen the issue.
Thanks.

Why reproduction is required

@antfu antfu closed this as completed Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants