Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use LowerCaseOff in @show_name #1451

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/AbstractAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,10 @@
set_name!(o, s)
end
end
if get(i, :compact, false) &&
s !== nothing
if get(i, :compact, false) && s !== nothing
if AbstractAlgebra.PrettyPrinting._supports_io_custom(i)
print(i, LowercaseOff())

Check warning on line 386 in src/AbstractAlgebra.jl

View check run for this annotation

Codecov / codecov/patch

src/AbstractAlgebra.jl#L385-L386

Added lines #L385 - L386 were not covered by tests
end
print(i, s)
return
end
Expand Down
5 changes: 4 additions & 1 deletion src/PrettyPrinting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1504,9 +1504,12 @@
end

_unwrap(io::IOCustom) = io

_unwrap(io::IOContext) = io.io

_supports_io_custom(io::IOCustom) = true
_supports_io_custom(io::IOContext) = _supports_io_custom(io.io)
_supports_io_custom(io::Any) = false

Check warning on line 1511 in src/PrettyPrinting.jl

View check run for this annotation

Codecov / codecov/patch

src/PrettyPrinting.jl#L1509-L1511

Added lines #L1509 - L1511 were not covered by tests

indent_string!(io::IO, str::String) = (_unwrap(io).indent_str = str; io)

IOCustom(io::IO, force_newlines = false) = IOCustom{typeof(io)}(io, 0, false, " ", 0, false, force_newlines)
Expand Down
Loading