mirror of
https://github.com/otaviocc/Triton.git
synced 2026-01-29 19:54:27 +00:00
Handle line break in slugified()
This commit is contained in:
parent
8572716a73
commit
3a86d153ea
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ public extension String {
|
|||
/// ```
|
||||
func slugified() -> String {
|
||||
trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
.components(separatedBy: .whitespaces)
|
||||
.components(separatedBy: .whitespacesAndNewlines)
|
||||
.filter { !$0.isEmpty }
|
||||
.joined(separator: "-")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue