github-slugger
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -6,3 +6,6 @@ # github-slugger change log | ||
## Unreleased | ||
* engage | ||
## 1.1.0 | ||
* Feature: Support for non-latin characters in slugs https://github.com/Flet/github-slugger/pull/2) Thanks [@tadatuta](https://github.com/tadatuta)! | ||
## 1.0.1 | ||
* Fix: bug for multiple empty slugds (https://github.com/Flet/github-slugger/pull/1) Thanks [@wooorm](https://github.com/wooorm)! |
@@ -46,4 +46,3 @@ module.exports = BananaSlug | ||
function slugger (string) { | ||
var allowedCharacters = 'A-Za-z0-9_ -' | ||
var re = new RegExp('[^' + allowedCharacters + ']', 'g') | ||
var re = /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,.\/:;<=>?@\[\]^`{|}~]/g | ||
var maintainCase = false | ||
@@ -50,0 +49,0 @@ var replacement = '-' |
{ | ||
"name": "github-slugger", | ||
"description": "Generate a slug just like GitHub does for markdown headings.", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"author": "Dan Flettre <fletd01@yahoo.com>", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -86,3 +86,8 @@ var test = require('tape') | ||
slug: 'duplicate-2' | ||
}, | ||
{ | ||
mesg: 'deals with non-latin chars', | ||
text: 'Привет', | ||
slug: 'привет' | ||
} | ||
] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9523
129