Fixed slugify behavior.
This commit is contained in:
@@ -40,7 +40,7 @@ const accentMap = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const plainCharRegex = /[a-zA-Z0-9]/;
|
const plainCharRegex = /[a-zA-Z0-9]/;
|
||||||
const defaultPunctuationRegex = /[.,?!:;&'‘’"“”…()[]{}<>\/*—]/;
|
const defaultPunctuationRegex = /[.,?!:;&'‘’"“”…()[\]{}<>/*—]/;
|
||||||
const defaultSymbolRegex = /[@$€£#%^+=\\~]/;
|
const defaultSymbolRegex = /[@$€£#%^+=\\~]/;
|
||||||
|
|
||||||
export default function slugify(strings, delimiter = '-', {
|
export default function slugify(strings, delimiter = '-', {
|
||||||
@@ -48,7 +48,7 @@ export default function slugify(strings, delimiter = '-', {
|
|||||||
lower = true,
|
lower = true,
|
||||||
encode = false,
|
encode = false,
|
||||||
accents: keepAccents = false,
|
accents: keepAccents = false,
|
||||||
punctuation: keepPunctuation = false,
|
punctuation: keepPunctuation = 'split',
|
||||||
punctuationRegex = defaultPunctuationRegex,
|
punctuationRegex = defaultPunctuationRegex,
|
||||||
symbols: keepSymbols = false,
|
symbols: keepSymbols = false,
|
||||||
symbolRegex = defaultSymbolRegex,
|
symbolRegex = defaultSymbolRegex,
|
||||||
|
|||||||
2
static
2
static
Submodule static updated: 50a262da61...c05345e3c7
Reference in New Issue
Block a user