Skip to content

Commit

Permalink
Revert missed part of rejected experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Apr 24, 2022
1 parent 76377fc commit 03d948e
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions src/lib/converter/plugins/PackagePlugin.ts
Expand Up @@ -100,30 +100,24 @@ export class PackagePlugin extends ConverterComponent {
private onBeginResolve(context: Context) {
const project = context.project;
if (this.readmeFile) {
if (project.comment) {
this.application.logger.verbose(
`Not applying readme as project comment since it already has a comment.`
);
} else {
const readme = readFile(this.readmeFile);
const comment = parseComment(
lexCommentString(readme),
context.converter.config,
(msg) => {
this.application.logger.warn(
`${msg} in ${this.readmeFile}`
);
}
);

if (comment.blockTags.length || comment.modifierTags.size) {
const readme = readFile(this.readmeFile);
const comment = parseComment(
lexCommentString(readme),
context.converter.config,
(msg) => {
this.application.logger.warn(
`Block and modifier tags will be ignored within the readme.`
`${msg} in ${this.readmeFile}`
);
}
);

project.readme = comment.summary;
if (comment.blockTags.length || comment.modifierTags.size) {
this.application.logger.warn(
`Block and modifier tags will be ignored within the readme.`
);
}

project.readme = comment.summary;
}

if (this.packageFile) {
Expand Down

0 comments on commit 03d948e

Please sign in to comment.