Git Product home page Git Product logo

Comments (4)

davidyell avatar davidyell commented on September 15, 2024

I will try and solve this and submit a PR today.

from utils.

davidyell avatar davidyell commented on September 15, 2024

Sorry, I don't understand how the replacement is working. I was looking to use /[^\w]/ for anything which wasn't a word character, but it seems as though it uses hexadecimal escaped characters.

I'll use beforeSlugGeneration() to do some changes 😸

from utils.

burzum avatar burzum commented on September 15, 2024

Honestly I haven right now no idea how to replace all and every not wanted character in a reliable way. The issue is if you make it to strict you might replace things you want. Especially given the fact that multi-byte slugs are valid, so you can't just say "accept only ASCII chars".

I think using the callback in this case is the right way to do it. I've updated the documentation on the callbacks and improved it a little by adding another callback. Please take a look at this commit, I've merged it already to develop https://github.com/burzum/utils/commit/b03ab304398bbd39f5cc9c74a0c024543e4c7762.

from utils.

davidyell avatar davidyell commented on September 15, 2024

Looks good to me dude, thanks for the update.

from utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.