File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed
Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change 11# slug
22
3- Package ` slug ` generate slug from unicode string, URL-friendly slugify with
3+ Package ` slug ` generate slug from Unicode string, URL-friendly slugify with
44multiple languages support.
55
66[ ![ Go Reference] ( https://pkg.go.dev/badge/github.com/gosimple/slug.svg )] ( https://pkg.go.dev/github.com/gosimple/slug )
@@ -43,10 +43,34 @@ func main() {
4343}
4444```
4545
46- ### Requests or bugs?
46+ ## Design
47+
48+ This library will always returns clean output from any Unicode string
49+ containing only the following ASCII characters:
50+
51+ * numbers: ` 0-9 `
52+ * small letters: ` a-z `
53+ * big letters: ` A-Z ` (only if you set ` Lowercase ` to ` false ` )
54+ * minus sign: ` - `
55+ * underscore: ` _ `
56+
57+ Minus sign and underscore characters will never appear at the beginning or
58+ the end of the returned string.
59+
60+ Thanks to context-insensitive transliteration of Unicode characters to ASCII
61+ output returned string is safe for URL slugs and filenames.
62+
63+ ## Requests or bugs?
4764
4865< https://github.com/gosimple/slug/issues >
4966
67+ If your language is missing you could add it in ` languages_substitution.go `
68+ file.
69+
70+ In case of missing proper Unicode characters transliteration to ASCII you could
71+ add them to underlying library:
72+ < https://github.com/gosimple/unidecode > .
73+
5074## Installation
5175
5276``` shell
You can’t perform that action at this time.
0 commit comments