Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bd81422

Browse files
committed
docs: improve handling of multiline JSDoc descriptions
1 parent 736da28 commit bd81422

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎packages/docs/build/api.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ const createMdx = async (file, component) => {
277277
? `<span className="badge bg-danger">Deprecated ${propInfo.tags.deprecated}</span>`
278278
: ''
279279
const description = propInfo.description
280-
? replaceText(component.displayName, 'description', propInfo.description)
280+
? replaceText(component.displayName, 'description', propInfo.description).replace(/\n(?!\n)/g,' ').replace(/\n\n/g,'\n')
281281
: '-'
282282
const type = propInfo.type
283283
? propInfo.type.name.includes('ReactElement')

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /