Skip to content

Commit 88bb6f2

Browse files
authored
Apply suggestions from code review
1 parent cc0f26a commit 88bb6f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Expanders.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ function Selectors.runner(::Type{ExampleBlocks}, x, page, doc)
540540

541541
# "parse" keyword arguments to example
542542
continued = false
543-
ansicolor = get(stdout, :color, false)::Bool
543+
ansicolor = Base.JLOptions().color != 2 # disable if --color=no
544544
if kwargs !== nothing
545545
continued = occursin(r"\bcontinued\s*=\s*true\b", kwargs)
546546
matched = match(r"\bansicolor\s*=\s*(true|false)\b", kwargs)
@@ -614,7 +614,7 @@ function Selectors.runner(::Type{REPLBlocks}, x, page, doc)
614614
mod = Utilities.get_sandbox_module!(page.globals.meta, "atexample", name)
615615

616616
# "parse" keyword arguments to repl
617-
ansicolor = get(stdout, :color, false)::Bool
617+
ansicolor = Base.JLOptions().color != 2 # disable if --color=no
618618
if kwargs !== nothing
619619
matched = match(r"\bansicolor\s*=\s*(true|false)\b", kwargs)
620620
if matched !== nothing

0 commit comments

Comments
 (0)