From 90f82902e524ab78414311a7f487e7356fbd6818 Mon Sep 17 00:00:00 2001 From: odow Date: Mon, 7 Oct 2024 16:29:52 +1300 Subject: [PATCH] Update --- src/print.jl | 2 -- test/test_print.jl | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/print.jl b/src/print.jl index 9be80794bb4..65d0c0b601f 100644 --- a/src/print.jl +++ b/src/print.jl @@ -78,8 +78,6 @@ function _escape_if_scientific(::MIME"text/latex", x::String) return "$(m[1]) \\times 10^{$(m[2])}" end -_string_round(x) = _string_round(MIME("text/plain"), x) - # Helper function that rounds carefully for the purposes of printing Reals # for example, 5.3 => 5.3, and 1.0 => 1 function _string_round(mode, x::Union{Float32,Float64}) diff --git a/test/test_print.jl b/test/test_print.jl index c51bac985a1..1966f86f4ae 100644 --- a/test/test_print.jl +++ b/test/test_print.jl @@ -1126,6 +1126,9 @@ function test_small_number_latex() y = 0.23e-8 * x @test function_string(MIME("text/latex"), y) == "2.3 \\times 10^{-9} x" @test function_string(MIME("text/plain"), y) == "2.3e-9 x" + y = 1.23 * x + @test function_string(MIME("text/latex"), y) == "1.23 x" + @test function_string(MIME("text/plain"), y) == "1.23 x" return end