Added profile scraper tests (WIP), fixed some profile scrapers. Fixed slugify not breaking existing slugs.
This commit is contained in:
@@ -42,7 +42,7 @@ const accentMap = {
|
||||
};
|
||||
|
||||
const plainCharRegex = /[a-zA-Z0-9]/;
|
||||
const defaultPunctuationRegex = /[.,?!:;&'‘’"“”…()[]{}<>\/*—-]/;
|
||||
const defaultPunctuationRegex = /[.,?!:;&'‘’"“”…()[]{}<>\/*—]/;
|
||||
const defaultSymbolRegex = /[@$€£#%^+=\\~]/;
|
||||
|
||||
function slugify(strings, delimiter = '-', {
|
||||
@@ -66,6 +66,7 @@ function slugify(strings, delimiter = '-', {
|
||||
: string;
|
||||
|
||||
const normalized = casedString
|
||||
.replace(/[_-]/g, ' ')
|
||||
.split('')
|
||||
.map((char) => {
|
||||
if (char === ' ') {
|
||||
|
||||
Reference in New Issue
Block a user