From e5a290750057fd23cde52fbc28bbd53bdf372741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 4 Jun 2024 09:13:40 +0200 Subject: [PATCH] fix: renders Markdown in all `description` fields --- .../starlight-openapi/components/parameter/Parameter.astro | 6 +++--- packages/starlight-openapi/components/schema/Schema.astro | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/starlight-openapi/components/parameter/Parameter.astro b/packages/starlight-openapi/components/parameter/Parameter.astro index 6afca07..43ecdbe 100644 --- a/packages/starlight-openapi/components/parameter/Parameter.astro +++ b/packages/starlight-openapi/components/parameter/Parameter.astro @@ -5,8 +5,8 @@ import { isParameterWithSchemaObject } from '../../libs/schemaObject' import Content from '../Content.astro' import Items from '../Items.astro' import Key from '../Key.astro' +import Md from '../Md.astro' import Schema from '../schema/Schema.astro' -import Text from '../Text.astro' interface Props { parameter: Parameter @@ -20,12 +20,12 @@ const { parameter } = Astro.props isOpenAPIV2Items(parameter) ? ( <> - {parameter.description} + ) : parameter.content ? ( <> - {parameter.description} + ) : isParameterWithSchemaObject(parameter) ? ( {description}} +{isObject && } {schema && } -{!isObject && {description}} +{!isObject && }