gosimple / slug

URL-friendly slugify with multiple languages support.
Mozilla Public License 2.0
1.15k stars 108 forks source link

How to remove special characters and space #71

Closed khanakia closed 2 years ago

khanakia commented 2 years ago

getting- started ## should become getting-started

How to achieve this ?

matrixik commented 2 years ago

This is already happening by default:

package main

import (
    "fmt"

    "github.com/gosimple/slug"
)

func main() {
    text := slug.Make("getting- started ##")
    fmt.Println(text) // Will print: "getting-started"
}