Skip to content
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

First line of Prism component output is indented #4246

Closed
1 task
IanVS opened this issue Aug 10, 2022 · 3 comments · Fixed by #4251
Closed
1 task

First line of Prism component output is indented #4246

IanVS opened this issue Aug 10, 2022 · 3 comments · Fixed by #4251
Assignees
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@IanVS
Copy link
Contributor

IanVS commented Aug 10, 2022

What version of astro are you using?

1.0.1

Are you using an SSR adapter? If so, which one?

none

What package manager are you using?

npm

What operating system are you using?

mac

Describe the Bug

I've upgraded from beta.70 to 1.0.1, and found that my Prism components have an indent on the first line.

I've upgraded @astrojs/prism to 1.0.0 as well.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-xfjsam?file=src/pages/index.astro

Participation

  • I am willing to submit a pull request for this issue.
@natemoo-re
Copy link
Member

Thanks for opening an issue, @IanVS! Not sure what's going on here, we'll take a look.

As a very quick workaround, it looks like setting white-space: normal on the pre element and white-space: pre on the pre > code element fixes it. But we'll get a proper fix out as soon as we can!

@natemoo-re natemoo-re self-assigned this Aug 10, 2022
@natemoo-re natemoo-re added s0-extra-small - P3: minor bug An edge case that only affects very specific usage (priority) labels Aug 10, 2022
@IanVS
Copy link
Contributor Author

IanVS commented Aug 10, 2022

Thanks @natemoo-re for the quick 👀 . Unfortunately, it seems that workaround removes all line breaks, so it won't work for my yaml examples.

@natemoo-re
Copy link
Member

Oh no! Alright, I'll be sure to prioritize this, in that case!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants