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

fix: renders Markdown in all description fields #34

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Conversation

Sporiff
Copy link
Contributor

@Sporiff Sporiff commented May 28, 2024

Describe the pull request

Closes #33

This PR uses the Markdown component to render all description fields in line with the OpenAPI spec linked in the above issue. From my own testing, the component renders Markdown as expected.

Why

As mentioned in #33, description fields for parameters may include Markdown just as the schema description field does. To ensure that these fields are rendered properly, the Md.astro component should be used in place of the Text.astro component.

How

The Text.astro component has been replaced with the Md.astro component for all parameter description fields.

Screenshots

Screenshot 2024-05-28 at 18 08 20

Copy link

vercel bot commented May 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
starlight-openapi ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 4:10pm

Copy link
Owner

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution and your patience 🙌

The changes looks perfect to me and seems to fix the issue 🎉

@HiDeoo HiDeoo changed the title Use Markdown component for descriptions fix: renders Markdown in all description fields Jun 4, 2024
@HiDeoo HiDeoo merged commit e5a2907 into HiDeoo:main Jun 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Support CommonMark markdown formatting for description fields
2 participants