Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
fix: Removes extra spaces around TOC items (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelkaron authored and jdx committed Nov 27, 2018
1 parent fa23000 commit f739c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Customize the code URL prefix by setting oclif.repositoryPrefix in package.json.

toc(__: Config.IConfig, readme: string): string {
return readme.split('\n').filter(l => l.startsWith('# '))
.map(l => l.slice(2))
.map(l => l.trim().slice(2))
.map(l => `* [${l}](#${slugify(l)})`)
.join('\n')
}
Expand Down

0 comments on commit f739c1c

Please sign in to comment.