Pluto.jl
Pluto.jl copied to clipboard
Syntax highlighting error involving range and macro
This code
@amacro begin
x = a : b:c
end
renders like

I'm using Pluto 0.19.0, Julia 1.7.2
Another minimal example:

Same thing with a, = (b) syntax:
@time let
for i in 1:5
x, = (2)
end
end
Looks like this, with end keywords not highlighted:
end become correctly highlighted when parentheses in (2) are removed:
@time let
for i in 1:5
x, = 2
end
end
x, = fn(2)
Only the last end keyword will be mis-highlighted when this syntax is used:
@time let
for i in 1:5
x, = fn(2)
end
end
Without range syntax
Try this code (indentation is important!):
@time let
for i in [1,2]
x, = (2)
end
end
This is highlighted like this:
Now place the cursor before the innermost end and press Backspace. Pluto will suddenly recognize this weirdly aligned end as belonging to for and highlight it correctly:
Versions
- Pluto v0.19.25
- Julia v1.9.0