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

Ensure unhandled directives are restored without any extra whitespace #2281

Merged

Conversation

HiDeoo
Copy link
Member

@HiDeoo HiDeoo commented Sep 3, 2024

Description

This PR fixes an issue reported on Discord where the current process of restoring unhandled directives could change the expected output if the unhandled directive was followed by some characters due to extra whitespace being added.

Assuming the following input:

## Environment variables (astro:env)

Before: (notice the space before the trailing ))

SCR-20240903-qkiu

After:

SCR-20240903-qklg

Copy link

changeset-bot bot commented Sep 3, 2024

🦋 Changeset detected

Latest commit: 178ff57

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Sep 3, 2024
Copy link

netlify bot commented Sep 3, 2024

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 178ff57
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/66d80e863cad99000852988d
😎 Deploy Preview https://deploy-preview-2281--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Makes sense — thanks for figuring that out! Left a small note re: performance, but seems solid to me.

packages/starlight/integrations/asides.ts Outdated Show resolved Hide resolved
@delucis delucis added the 🌟 patch Change that triggers a patch release label Sep 3, 2024
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

With all the time we save avoiding RegExp replaces, I have time to double approve!

@delucis delucis merged commit 5062d30 into withastro:main Sep 4, 2024
15 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Sep 4, 2024
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Sep 7, 2024
* main: (37 commits)
  [ci] format
  i18n(ko-KR): update `manual-setup.mdx` (withastro#2294)
  i18n(ko-KR): update `configuration.mdx` (withastro#2295)
  [ci] release (withastro#2292)
  Add support for SSR (withastro#1255)
  Add Markdoc preset and example (withastro#2249)
  Refactor sidebar persistence logic for better slow device performance (withastro#2242)
  [ci] format
  Add docs.ryzekit.com to showcase (withastro#2291)
  Update astro dependency to 4.15.3 across monorepo (withastro#2289)
  [ci] release (withastro#2290)
  Prevent Zod errors from crashing build (withastro#2288)
  i18n(fr): update `guides/css-and-tailwind` (withastro#2286)
  i18n(ko-KR): update `css-and-tailwind.mdx` (withastro#2284)
  Add WCAG AAA colour contrast option to theme editor (withastro#2282)
  [ci] release (withastro#2283)
  Parse `<StarlightPage />` frontmatter asynchronously (withastro#2279)
  Ensure unhandled directives are restored without any extra whitespace (withastro#2281)
  i18n(fr): update `resources/plugins` (withastro#2278)
  i18n(ko-KR): update `plugins.mdx` (withastro#2277)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 🌟 patch Change that triggers a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants