From 45e7626d1dade1a8c52b61a6503767116263e6bb Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Wed, 15 Oct 2025 14:02:01 +0200 Subject: [PATCH] finish the `if-else rule tree formating` started in e34cc37a7 --- src/JuliaSyntaxHighlighting.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/JuliaSyntaxHighlighting.jl b/src/JuliaSyntaxHighlighting.jl index 48ad0df..fb1155d 100644 --- a/src/JuliaSyntaxHighlighting.jl +++ b/src/JuliaSyntaxHighlighting.jl @@ -338,7 +338,8 @@ function _hl_annotations!(highlights::Vector{@NamedTuple{region::UnitRange{Int}, name = Symbol(view(regionstr, (1+argoffset-span(arg1[end])):argoffset)) ifelse(name in BUILTIN_FUNCTIONS, :julia_builtin, :julia_funcall) end - elseif syntax_errors && JuliaSyntax.is_error(nkind); :julia_error + elseif syntax_errors && JuliaSyntax.is_error(nkind) + :julia_error elseif ((depthchange, ptype) = paren_type(nkind)) |> last != :none depthref = getfield(pdepths, ptype) pdepth = if depthchange > 0