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

Commit

Permalink
fix: fixed slug generation with emojis
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 15, 2018
1 parent 6a7d910 commit 0eb5b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/readme.ts
Expand Up @@ -63,7 +63,7 @@ The readme must have any of the following tags inside of it for it to be replace
toc(__: Config.IConfig, readme: string): string {
return readme.split('\n').filter(l => l.startsWith('# '))
.map(l => l.slice(2))
.map(l => [l, _.kebabCase(l.trim().replace(/[^a-zA-Z0-9\- ]/g, ''))])
.map(l => [l, _.kebabCase(l.trim()).replace(/[^a-zA-Z0-9\- ]/g, '')])
.map(([title, link]) => `* [${title}](#${link})`)
.join('\n')
}
Expand Down

0 comments on commit 0eb5b51

Please sign in to comment.