From b95b50bbd1dad03255155bbb51974ab79cb86de4 Mon Sep 17 00:00:00 2001 From: Steven Serrata Date: Tue, 3 Dec 2024 13:26:13 -0500 Subject: [PATCH 1/3] avoid block elements inside p --- .../src/markdown/createAuthentication.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createAuthentication.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createAuthentication.ts index b3fb1688e..e49c36e89 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createAuthentication.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createAuthentication.ts @@ -35,15 +35,15 @@ export function createAuthentication(securitySchemes: SecuritySchemeObject) { create("td", { children: [ guard(tokenUrl, () => - create("p", { children: `Token URL: ${tokenUrl}` }) + create("div", { children: `Token URL: ${tokenUrl}` }) ), guard(authorizationUrl, () => - create("p", { + create("div", { children: `Authorization URL: ${authorizationUrl}`, }) ), guard(refreshUrl, () => - create("p", { children: `Refresh URL: ${refreshUrl}` }) + create("div", { children: `Refresh URL: ${refreshUrl}` }) ), create("span", { children: "Scopes:" }), create("ul", { From 58807ab7f99d4238d67ce99537f11e941f651879 Mon Sep 17 00:00:00 2001 From: Steven Serrata Date: Tue, 3 Dec 2024 13:26:42 -0500 Subject: [PATCH 2/3] use JSX format string to avoid duplicate elements --- .../src/markdown/createTermsOfService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts index 0f5fdf944..273ba5189 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * ========================================================================== */ -import { create } from "./utils"; +import { create, guard } from "./utils"; export function createTermsOfService(termsOfService: string | undefined) { if (!termsOfService) return ""; @@ -23,7 +23,7 @@ export function createTermsOfService(termsOfService: string | undefined) { }), create("a", { href: `${termsOfService}`, - children: termsOfService, + children: `{'${termsOfService}'}`, }), ], }); From 52fe4ae81654c109d643389a1cd3f50ce4c57f4d Mon Sep 17 00:00:00 2001 From: Steven Serrata Date: Tue, 3 Dec 2024 14:19:35 -0500 Subject: [PATCH 3/3] remove unused import --- .../src/markdown/createTermsOfService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts index 273ba5189..3ce5aea57 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createTermsOfService.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * ========================================================================== */ -import { create, guard } from "./utils"; +import { create } from "./utils"; export function createTermsOfService(termsOfService: string | undefined) { if (!termsOfService) return "";