From c6e52e5a3d831e758fb5f78c4b9a090a626ad425 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Wed, 23 Oct 2024 14:24:06 +0200 Subject: docs: optimize line breaks in default objects (#3190) --- scripts/apidocs/processing/jsdocs.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/apidocs/processing/jsdocs.ts b/scripts/apidocs/processing/jsdocs.ts index 0999abca..41c1b84a 100644 --- a/scripts/apidocs/processing/jsdocs.ts +++ b/scripts/apidocs/processing/jsdocs.ts @@ -50,7 +50,11 @@ export function getParameterTags(jsdocs: JSDoc): Record { } export function getDefault(jsdocs: JSDoc): string | undefined { - return getOptionalTagFromJSDoc(jsdocs, `default`); + return ( + getOptionalTagFromJSDoc(jsdocs, `default`) + // Prevent line breaks between the key and the value { foo: 'bar' } + ?.replaceAll(': ', ': ') + ); } export function getThrows(jsdocs: JSDoc): string[] { -- cgit v1.2.3