Skip to content

Commit e2bfc9d

Browse files
Liozoucarlobaldassi
authored andcommitted
Qualify wrap calls
1 parent f1eaaf9 commit e2bfc9d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/ArgParse.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ differences as well.
1111
"""
1212
module ArgParse
1313

14-
using TextWrap
14+
import TextWrap
1515

1616
if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@compiler_options"))
1717
@eval Base.Experimental.@compiler_options compile=min optimize=0 infer=false

src/parsing.jl

+6-6
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function usage_string(settings::ArgParseSettings)
238238
usage_len = length(usage_pre) + 1
239239

240240
str_nonwrapped = usage_pre * excl_str * optl_str * posl_str * cmdl_str
241-
str_wrapped = wrap(str_nonwrapped, break_long_words = false, break_on_hyphens = false,
241+
str_wrapped = TextWrap.wrap(str_nonwrapped, break_long_words = false, break_on_hyphens = false,
242242
subsequent_indent = min(usage_len, lc_len_limit))
243243

244244

@@ -291,13 +291,13 @@ function print_group(io::IO, lst::Vector, desc::AbstractString, lc_usable_len::I
291291
if l1len lc_usable_len
292292
rfill = " "^(lc_len - l1len)
293293
ll_nonwrapped = l[1] * rfill * rmargin * l[2]
294-
ll_wrapped = wrap(ll_nonwrapped, break_long_words = false, break_on_hyphens = false,
295-
initial_indent = lmargin, subsequent_indent = sindent)
294+
ll_wrapped = TextWrap.wrap(ll_nonwrapped, break_long_words = false, break_on_hyphens = false,
295+
initial_indent = lmargin, subsequent_indent = sindent)
296296
println_unnbsp(io, ll_wrapped)
297297
else
298298
println_unnbsp(io, lmargin, l[1])
299-
l2_wrapped = wrap(l[2], break_long_words = false, break_on_hyphens = false,
300-
initial_indent = sindent, subsequent_indent = sindent)
299+
l2_wrapped = TextWrap.wrap(l[2], break_long_words = false, break_on_hyphens = false,
300+
initial_indent = sindent, subsequent_indent = sindent)
301301
println_unnbsp(io, l2_wrapped)
302302
end
303303
end
@@ -385,7 +385,7 @@ function show_message(io::IO, message::AbstractString, preformatted::Bool)
385385
print(io, message)
386386
else
387387
for l in split(message, "\n\n")
388-
message_wrapped = wrap(l, break_long_words = false, break_on_hyphens = false)
388+
message_wrapped = TextWrap.wrap(l, break_long_words = false, break_on_hyphens = false)
389389
println_unnbsp(io, message_wrapped)
390390
end
391391
end

0 commit comments

Comments
 (0)