Skip to content

Commit

Permalink
Add docs to EnableSmartTruncate
Browse files Browse the repository at this point in the history
  • Loading branch information
matrixik authored Sep 27, 2022
1 parent 1994a42 commit 5986563
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion slug.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ var (
CustomRuneSub map[rune]string

// MaxLength stores maximum slug length.
// It's smart so it will cat slug after full word.
// By default slugs aren't shortened.
// If MaxLength is smaller than length of the first word, then returned
// slug will contain only substring from the first word truncated
// after MaxLength.
MaxLength int

// EnableSmartTruncate defines if cutting with MaxLength is smart.
// Smart algorithm will cat slug after full word.
// Default is true.
EnableSmartTruncate = true

// Lowercase defines if the resulting slug is transformed to lowercase.
Expand Down

0 comments on commit 5986563

Please sign in to comment.