Skip to content

build(docs): fix description comments sometimes empty #12885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"chalk": "^1.1.3",
"codelyzer": "^4.3.0",
"dgeni": "^0.4.10",
"dgeni-packages": "^0.26.2",
"dgeni-packages": "^0.26.7",
"firebase": "^4.0.0",
"firebase-admin": "^5.0.0",
"firebase-tools": "^4.1.0",
Expand Down
11 changes: 11 additions & 0 deletions tools/dgeni/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Package} from 'dgeni';
import {Host} from 'dgeni-packages/typescript/services/ts-host/host';
import {patchLogService} from './patch-log-service';
import {DocsPrivateFilter} from './processors/docs-private-filter';
import {Categorizer} from './processors/categorizer';
Expand Down Expand Up @@ -124,6 +125,16 @@ apiDocsPackage.config((readTypeScriptModules: ReadTypeScriptModules, tsParser: T
];
});

apiDocsPackage.config((tsHost: Host) => {
// Disable concatenation of multiple leading comments for a TypeScript node. Since all shipped
// source files have a license banner at top, the license banner comment would be incorrectly
// considered as "comment" for the first TypeScript node of a given file. Since there are
// various files in the Material project where the first node of a source file is exported and
// should only use the first leading comment, we need to disable comment concatenation.
// See for example: src/cdk/coercion/boolean-property.ts
tsHost.concatMultipleLeadingComments = false;
});

// Configure processor for finding nunjucks templates.
apiDocsPackage.config((templateFinder: any, templateEngine: any) => {
// Where to find the templates for the doc rendering
Expand Down