Skip to content

Commit 7d8c464

Browse files
feat: render metadata after properties for consistency (#73)
1 parent a1e1d6b commit 7d8c464

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/lib/parser/markdown.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,6 @@ const interfacesToMarkdown = ({
160160
markdown.push(`${documentation}\n`);
161161
}
162162

163-
const metadata = metadataToMarkdown({
164-
...jsDocsMetadata(jsDocs),
165-
url,
166-
emoji
167-
});
168-
169-
markdown.push(...metadata);
170-
171163
markdown.push(`| Property | Type | Description |`);
172164
markdown.push('| ---------- | ---------- | ---------- |');
173165

@@ -184,6 +176,14 @@ const interfacesToMarkdown = ({
184176

185177
markdown.push('\n');
186178

179+
const metadata = metadataToMarkdown({
180+
...jsDocsMetadata(jsDocs),
181+
url,
182+
emoji
183+
});
184+
185+
markdown.push(...metadata);
186+
187187
return markdown.join('\n');
188188
};
189189

src/test/mock.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,17 @@ References:
352352

353353

354354

355-
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/test/mock.ts#L183)
356-
357355
| Property | Type | Description |
358356
| ---------- | ---------- | ---------- |
359357
| `SECOND` | `1000` | |
360358
| `MINUTE` | `60 * SECOND` | |
361359

362360

363-
### :gear: MemberType
361+
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/test/mock.ts#L183)
364362

363+
### :gear: MemberType
365364

366365

367-
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/test/mock.ts#L188)
368366

369367
| Property | Type | Description |
370368
| ---------- | ---------- | ---------- |
@@ -373,6 +371,8 @@ References:
373371
| `T3` | `` | |
374372

375373

374+
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/test/mock.ts#L188)
375+
376376
## :tropical_drink: Interfaces
377377

378378
- [Foo](#gear-foo)
@@ -382,33 +382,33 @@ References:
382382

383383
A Foo interface description.
384384

385-
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/test/mock.ts#L157)
386-
387385
| Property | Type | Description |
388386
| ---------- | ---------- | ---------- |
389387
| `hello` | `string` | Says hello. |
390388
| `world` | `string or undefined` | Something default: `hello` |
391389
| `abc` | `Abc` | |
392390

393391

392+
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/test/mock.ts#L157)
393+
394394
### :gear: StorageConfigRedirect
395395

396396
Use a URL redirect to prevent broken links if you've moved a page or to shorten URLs.
397397

398-
References:
399-
400-
* [https://github.com/peterpeterparker/tsdoc-markdown](https://github.com/peterpeterparker/tsdoc-markdown)
401-
402-
403-
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/test/mock.ts#L259)
404-
405398
| Property | Type | Description |
406399
| ---------- | ---------- | ---------- |
407400
| `source` | `string` | The glob pattern or specific path to match for incoming requests that should be redirected. type: {StorageConfigSourceGlob} |
408401
| `location` | `string` | The URL or path to which the request should be redirected. type: {string} |
409402
| `code` | `301 or 302` | The HTTP status code to use for the redirect, typically 301 (permanent redirect) or 302 (temporary redirect). type: {301 or 302} |
410403

411404

405+
References:
406+
407+
* [https://github.com/peterpeterparker/tsdoc-markdown](https://github.com/peterpeterparker/tsdoc-markdown)
408+
409+
410+
[:link: Source](https://github.com/peterpeterparker/tsdoc-markdown/tree/main/src/test/mock.ts#L259)
411+
412412
## :cocktail: Types
413413

414414
- [yolo](#gear-yolo)

0 commit comments

Comments
 (0)