Skip to content

Commit

Permalink
Update: slug
Browse files Browse the repository at this point in the history
  • Loading branch information
yzane committed Mar 16, 2020
1 parent ad6e619 commit 3f4aeaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function Slug(string) {
string.trim()
.toLowerCase()
.replace(/\s+/g, '-') // Replace whitespace with -
.replace(/[\]\[\!\"\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`]/g, '') // Remove known punctuators
.replace(/[\]\[\!\'\#\$\%\&\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}]/g, '') // Remove known punctuators
.replace(/^\-+/, '') // Remove leading -
.replace(/\-+$/, '') // Remove trailing -
);
Expand Down

0 comments on commit 3f4aeaa

Please sign in to comment.