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

Improve with_unicode #1495

Merged
merged 1 commit into from
Nov 6, 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
2 changes: 1 addition & 1 deletion src/AbstractAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import GroupsCore
import GroupsCore: gens, ngens, order, mul!, istrivial

# A list of all symbols external packages should not import from AbstractAlgebra
import_exclude = [:import_exclude, :QQ, :ZZ,
const import_exclude = [:import_exclude, :QQ, :ZZ,
:RealField, :number_field,
:AbstractAlgebra,
:inv, :log, :exp, :sqrt, :div, :divrem,
Expand Down
9 changes: 6 additions & 3 deletions src/PrettyPrinting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1398,9 +1398,12 @@
end

function with_unicode(f::Function)
old_allow_unicode = allow_unicode(true);
f()
allow_unicode(old_allow_unicode);
old_allow_unicode = allow_unicode(true)
try
f()

Check warning on line 1403 in src/PrettyPrinting.jl

View check run for this annotation

Codecov / codecov/patch

src/PrettyPrinting.jl#L1401-L1403

Added lines #L1401 - L1403 were not covered by tests
finally
allow_unicode(old_allow_unicode)

Check warning on line 1405 in src/PrettyPrinting.jl

View check run for this annotation

Codecov / codecov/patch

src/PrettyPrinting.jl#L1405

Added line #L1405 was not covered by tests
end
end

################################################################################
Expand Down
Loading