@@ -164,7 +164,7 @@ method fix_repeating_arguments(self: Pattern) {.base.} =
164
164
if e.value.kind == vkNone:
165
165
e.value = val(@ [])
166
166
elif e.value.kind != vkList:
167
- e.value = val(($ e.value).split ())
167
+ e.value = val(($ e.value).split_whitespace ())
168
168
if e.class == " Command" or
169
169
e.class == " Option" and Option(e).argcount == 0 :
170
170
e.value = val(0 )
@@ -250,7 +250,7 @@ proc option_parse[T](
250
250
var (options, p, description) = option_description.strip().partition(" ")
251
251
discard p
252
252
options = options.replace(",", " ").replace("=", " ")
253
- for s in options.split ():
253
+ for s in options.split_whitespace ():
254
254
if s.starts_with "--":
255
255
long = s
256
256
elif s.starts_with "-":
@@ -338,7 +338,7 @@ proc `@`(tokens: TokenStream): var seq[string] = tokens.tokens
338
338
proc token_stream(source: seq [string ], error: ref Exception): TokenStream =
339
339
TokenStream(tokens: source, error: error)
340
340
proc token_stream(source: string , error: ref Exception): TokenStream =
341
- token_stream(source.split (), error)
341
+ token_stream(source.split_whitespace (), error)
342
342
343
343
proc current(self: TokenStream): string =
344
344
if @ self.len > 0 :
@@ -549,7 +549,7 @@ proc printable_usage(doc: string): string =
549
549
550
550
551
551
proc formal_usage(printable_usage: string ): string =
552
- var pu = printable_usage.split ()
552
+ var pu = printable_usage.split_whitespace ()
553
553
pu.delete(0 )
554
554
var pu0 = pu[0 ]
555
555
pu.delete(0 )
0 commit comments