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

Remove extra spaces around TOC items #76

Merged
merged 1 commit into from
Nov 27, 2018
Merged
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
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