Add more diagnostic help to error messages thrown by <Steps>#1838
Merged
Add more diagnostic help to error messages thrown by <Steps>#1838
<Steps>#1838Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
🦋 Changeset detectedLatest commit: 8b79c5c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Contributor
size-limit report 📦
|
HiDeoo
approved these changes
May 7, 2024
Member
HiDeoo
left a comment
There was a problem hiding this comment.
Played with a few broken scenarios locally and even on an Astro docs branch with a few steps errors, and it definitely helps a lot already imo. Great improvement 🌟
Merged
HiDeoo
added a commit
to HiDeoo/starlight
that referenced
this pull request
May 8, 2024
* main: i18n(zh-cn): Update docs about synced-tabs (withastro#1834) i18n(zh-cn): Update some docs about withastro#1620 & withastro#1613 (withastro#1835) Add more diagnostic help to error messages thrown by `<Steps>` (withastro#1838) i18n(zh-cn): Update components.mdx (withastro#1836) i18n(zh-cn): Update community-content.mdx (withastro#1833) Improve type checking job (withastro#1831) [ci] format [ci] release (withastro#1832) i18n(ru): update ru.json (withastro#1826) Fix `<Tabs>` sync issue with inconsistent use of `icon` on `<TabItem>` components (withastro#1811) Enable `BASE_URL` tests (withastro#1828)
Yoxnear
pushed a commit
to Yoxnear/starlight-custom
that referenced
this pull request
Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow up to some feedback from @yanthomasdev that it was hard to figure out which
<Steps>component was erroring in buildsThe
<Steps>component now logs the HTML it receives as part of the hints in error messages:This is still relatively verbose and not 1:1 with what is authored because
<Steps>receives the HTML rendered by Astro instead of the raw Markdown an author wrote, but is hopefully still helpful for locating which instance of<Steps>is causing issues.Notes
@HiDeoo also suggested using a global remark plugin to check structure and be able to error with proper positional information in the authored Markdown. This could indeed be nicer, but would not work in Markdoc and would add extra overhead to all content processing, vs. this approach which only runs the error logic on the children of
<Steps>.We can consider potential refinements to this output in the future if we hear from people that this verbose logging is too overwhelming.