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

[Docs Site] Remove trailing whitespace from Type component #20275

Open
wants to merge 1 commit into
base: production
Choose a base branch
from

Conversation

KianNH
Copy link
Contributor

@KianNH KianNH commented Feb 25, 2025

Summary

Components with whitespace between the markup and style tags result in trailing whitespace.

A possible proposal, albeit a breaking change, is tracked at withastro/roadmap#868

This fixes the issue in the interim - there are workarounds, like wrapping the markup in a fragment, but they do not apply to components we don't control (i.e the Starlight Badge) so we just render it to HTML and trim the whitespace.

Copy link
Contributor

Howdy and thanks for contributing to our repo. We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.

Copy link
Contributor

@@ -2,6 +2,8 @@ import { experimental_AstroContainer } from "astro/container";
import { getContainerRenderer } from "@astrojs/mdx";
import { loadRenderers } from "astro:container";
import { render, type CollectionEntry } from "astro:content";
import type { AstroComponentFactory } from "astro/runtime/server/index.js";
import type { AstroGlobal } from "astro";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'AstroGlobal' is defined but never used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants