Skip to content

Commit

Permalink
fix: add comment for last link when position 'end'
Browse files Browse the repository at this point in the history
  • Loading branch information
strdr4605 committed Apr 25, 2020
1 parent 96b65f5 commit 5bfc7f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ export function createNewFileContent(

let newFileContent = fileContentByLine.join("\n");
if (!Number.isFinite(endHeaderIndex) && "end" === argv.position) {
newFileContent += `${LINK_OFFSET}[${linkText}](#${anchorSlug})\n`;
newFileContent += `${LINK_OFFSET}[${linkText}](#${anchorSlug})${
argv.silent ? "" : LINK_COMMENT
}\n`;
}

return newFileContent;
Expand Down

0 comments on commit 5bfc7f0

Please sign in to comment.