Skip to content

Commit

Permalink
feat: Adding a newline on toc generation and update
Browse files Browse the repository at this point in the history
This solves #17. This enables a markdown linter
not to fail because the toc is now commonmark
valid.

Signed-off-by: Johannes Amorosa <[email protected]>
  • Loading branch information
Johannes Amorosa committed May 28, 2020
1 parent c20ee4f commit 6712261
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export function create (name: string) {

createDecisions(name, savePath)
let toc = generate('toc', { output: false })
fs.writeFileSync(savePath + 'README.md', toc)
fs.writeFileSync(savePath + 'README.md', toc + '\n')
}
2 changes: 1 addition & 1 deletion src/lib/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function updateNameByTitle (): void {

function updateToc (): void {
let toc = generate('toc', { output: false })
fs.writeFileSync(savePath + 'README.md', toc)
fs.writeFileSync(savePath + 'README.md', toc + '\n')
}

export function update (): void {
Expand Down

0 comments on commit 6712261

Please sign in to comment.