Skip to content

Commit 0dd9f7a

Browse files
committed
docs: remove extra asterisks from single line jsdoc comments (#4792)
if a single line jsdoc comment was spread across multiple lines by the asterisks themseles: ```ts /** * Single-line comment */ ``` We don't want that asterisk to be misinterpreted. Stopgap solution.
1 parent d97c601 commit 0dd9f7a

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

website/generate-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3096,7 +3096,7 @@ function addCategory(comment, category) {
30963096

30973097
const trailing = comment.match(/\s*$/)?.[0] ?? '';
30983098
const body = comment.slice(0, comment.length - trailing.length);
3099-
const oneLine = /^(\s*)\/\*\*\s*(.*?)\s*\*\/$/.exec(body);
3099+
const oneLine = /^(\s*)\/\*\*[^\S\r\n]*(.*?)[^\S\r\n]*\*\/$/.exec(body);
31003100
if (oneLine != null) {
31013101
const [, indent, text] = oneLine;
31023102
return `${indent}/**\n${indent} * ${text}\n${indent} *\n${indent} * @category ${category}\n${indent} */${trailing}`;

website/pages/api-v17/graphql.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ isDevModeEnabled(); // => true
135135

136136
#### GraphQLParseContext
137137

138-
**Interface.** * Context published on `graphql:parse`.
138+
**Interface.** Context published on `graphql:parse`.
139139

140140
<hr className="api-subsection-divider" />
141141

@@ -172,7 +172,7 @@ isDevModeEnabled(); // => true
172172

173173
#### GraphQLValidateContext
174174

175-
**Interface.** * Context published on `graphql:validate`.
175+
**Interface.** Context published on `graphql:validate`.
176176

177177
<hr className="api-subsection-divider" />
178178

@@ -214,7 +214,7 @@ isDevModeEnabled(); // => true
214214

215215
#### GraphQLExecuteContext
216216

217-
**Interface.** * Context published on `graphql:execute`.
217+
**Interface.** Context published on `graphql:execute`.
218218

219219
<hr className="api-subsection-divider" />
220220

@@ -271,7 +271,7 @@ isDevModeEnabled(); // => true
271271

272272
#### GraphQLExecuteRootSelectionSetContext
273273

274-
**Interface.** * Context published on `graphql:execute:rootSelectionSet`.
274+
**Interface.** Context published on `graphql:execute:rootSelectionSet`.
275275

276276
<hr className="api-subsection-divider" />
277277

@@ -400,7 +400,7 @@ carries the `errors` array, mirroring `graphql:validate`.
400400

401401
#### GraphQLSubscribeContext
402402

403-
**Interface.** * Context published on `graphql:subscribe`.
403+
**Interface.** Context published on `graphql:subscribe`.
404404

405405
<hr className="api-subsection-divider" />
406406

@@ -457,7 +457,7 @@ carries the `errors` array, mirroring `graphql:validate`.
457457

458458
#### GraphQLResolveContext
459459

460-
**Interface.** * Context published on `graphql:resolve`.
460+
**Interface.** Context published on `graphql:resolve`.
461461

462462
<hr className="api-subsection-divider" />
463463

@@ -524,7 +524,7 @@ carries the `errors` array, mirroring `graphql:validate`.
524524

525525
#### GraphQLChannelContextByName
526526

527-
**Interface.** * Mapping from tracing channel name to the context type published on it.
527+
**Interface.** Mapping from tracing channel name to the context type published on it.
528528

529529
<hr className="api-subsection-divider" />
530530

0 commit comments

Comments
 (0)