aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2024-10-23 14:24:06 +0200
committerGitHub <[email protected]>2024-10-23 12:24:06 +0000
commitc6e52e5a3d831e758fb5f78c4b9a090a626ad425 (patch)
treed99cc5216b7a1f2caa5bd17fb5ce2facf5c72870 /scripts
parentd5e697dcb160c365a49fc111972827e1490efed5 (diff)
downloadfaker-c6e52e5a3d831e758fb5f78c4b9a090a626ad425.tar.xz
faker-c6e52e5a3d831e758fb5f78c4b9a090a626ad425.zip
docs: optimize line breaks in default objects (#3190)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/apidocs/processing/jsdocs.ts6
1 files changed, 5 insertions, 1 deletions
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<string, JSDocTag> {
}
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[] {