Comments (8)
A setting with characters to preserve would be great!
from slugify.
There are lots of characters that are allowed in a URL that are replaced by a dash. That's how slugification usually works.
We could potentially add an option with an array of characters to preserve, but as a user, I think version3-1
is perfectly fine.
from slugify.
As I understands, slugify should work nice with filenames, and having a dot in the filename can change how it is opened by default
from slugify.
I also encountered this issue during migration of a blog. In a previous system we used «underscore» as valid part of slug. And now in Gatsby it's impossible to save previous structure/paths. Would be really awesome to see this improvement.
from slugify.
@sindresorhus If you okay with a proposal to add an option to preserve some characters, I can make a PR
p.s. oh crap, just noticed that you're on a vacation, sry :)
from slugify.
PR welcome. You can use 2aa5659 as an example of what's expected of the PR.
from slugify.
Also I noticed, that Gatsby uses v.1.x.x of slugify
, so this change probably won't benefit me 😅. But I will try anyway. Thank you
from slugify.
Hello @sindresorhus . Is it still perhaps possible to create a function that preserves a dot "." in the url? :/
from slugify.
Related Issues (20)
- All Caps cause incorrect dashes!
- Support multiple occurrences HOT 6
- Add an option to support leading underscores HOT 1
- Removing of '/' character HOT 1
- Extract transliteration into it's own library HOT 3
- Error: "Expected identifier, string or number" on Edge-18 HOT 6
- Transpiling to ES5 HOT 1
- Truncate string input? HOT 2
- Allow empty replacement HOT 1
- Make patternSlug customizable HOT 3
- Decamelization should ignore plurals of acronyms
- You may need an appropriate loader to handle this file type HOT 1
- Can we support chinese language? HOT 2
- Cannot use Slugify inside Jest tests HOT 2
- user password included when populate with user HOT 1
- [enhancement] Compund slugs HOT 2
- Error [ERR_REQUIRE_ESM]: require() of ES Module HOT 5
- Option disabling `transliterate`
- Contractions/possessions removal causes unwanted behavior
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slugify.