Skip to content

Commit f0f0106

Browse files
committed
Add trailing newline to generated doc files
Resolves #2632
1 parent 32fff2b commit f0f0106

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
- If a relative linked image is referenced multiple times, TypeDoc will no longer sometimes produce invalid links to the image #2627.
88
- `@link` tags will now be validated in referenced markdown documents, #2629.
99
- `@link` tags are now resolved in project documents, #2629.
10-
- `@hidden` is now properly applied when placed in a function implementation comment.
10+
- HTML/JSON output generated by TypeDoc now contains a trailing newline, #2632.
11+
- `@hidden` is now properly applied when placed in a function implementation comment, #2634.
1112
- Comments on re-exports are now rendered.
1213

1314
### Thanks!

src/lib/application.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ export class Application extends ChildableComponent<
614614
const ser = this.serializer.projectToObject(project, process.cwd());
615615

616616
const space = this.options.getValue("pretty") ? "\t" : "";
617-
await writeFile(out, JSON.stringify(ser, null, space));
617+
await writeFile(out, JSON.stringify(ser, null, space) + "\n");
618618
this.logger.info(this.i18n.json_written_to_0(nicePath(out)));
619619
this.logger.verbose(`JSON rendering took ${Date.now() - start}ms`);
620620
}

src/lib/output/themes/default/DefaultTheme.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export class DefaultTheme extends Theme {
291291

292292
render(page: PageEvent<Reflection>, template: RenderTemplate<PageEvent<Reflection>>): string {
293293
const templateOutput = this.defaultLayoutTemplate(page, template);
294-
return "<!DOCTYPE html>" + JSX.renderElement(templateOutput);
294+
return "<!DOCTYPE html>" + JSX.renderElement(templateOutput) + "\n";
295295
}
296296

297297
private _navigationCache: NavigationElement[] | undefined;

0 commit comments

Comments
 (0)