From 909fad92dc92fbb4386fb319f122011856c2d8f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Baru=C4=8Di=C4=87?= Date: Wed, 19 Nov 2025 14:22:21 +0100 Subject: [PATCH] Fix typo in printing errors --- src/parser/parser.jl | 2 +- test/parser.jl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/parser/parser.jl b/src/parser/parser.jl index ed13f3a..f2194aa 100644 --- a/src/parser/parser.jl +++ b/src/parser/parser.jl @@ -8,7 +8,7 @@ end function Base.showerror(io::IO, e::TeXParseError) println(io, "TeXParseError: ", e.msg) show_state(io, e.stack, e.position, e.tex) - show_tokenization(io, tex) + show_tokenization(io, e.tex) end function show_tokenization(io, tex) diff --git a/test/parser.jl b/test/parser.jl index 6370ec3..19c59a0 100644 --- a/test/parser.jl +++ b/test/parser.jl @@ -20,6 +20,10 @@ end ) end + @testset "Showing errors" begin + @test_throws "tokenized as" texparse("{") + end + @testset "Delimiter" begin expr = texparse(L"\left(\frac{x}{y}\right)") delimited = expr.args[1].args[1]