Skip to content

Commit

Permalink
docs: optimize line breaks in default objects (#3190)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Oct 23, 2024
1 parent d5e697d commit c6e52e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/apidocs/processing/jsdocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] {
Expand Down

0 comments on commit c6e52e5

Please sign in to comment.