From 59865638ab4b5265e338d83e8bfd5cdcc4c40f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dobros=C5=82aw=20=C5=BBybort?= Date: Tue, 27 Sep 2022 23:32:50 +0200 Subject: [PATCH] Add docs to EnableSmartTruncate --- slug.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slug.go b/slug.go index c865e21..99520e7 100644 --- a/slug.go +++ b/slug.go @@ -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.