Skip to content

Commit

Permalink
allow .. as an identifier, fixes #1875
Browse files Browse the repository at this point in the history
  • Loading branch information
Pangoraw authored and dralletje committed Feb 1, 2022
1 parent 2239865 commit baad1b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/analysis/ExpressionExplorer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ end

# this is stupid -- désolé
function is_joined_funcname(joined::Symbol)
occursin('.', String(joined))
joined !== :.. #= .. is a valid identifier 😐 =# && occursin('.', String(joined))
end

assign_to_kw(e::Expr) = e.head == :(=) ? Expr(:kw, e.args...) : e
Expand Down
10 changes: 10 additions & 0 deletions test/React.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,16 @@ import Distributed
end
end

@testset ".. as an identifier" begin
notebook = Notebook(Cell.([
".. = 1",
"..",
]))
update_run!(🍭, notebook, notebook.cells)

@test all(noerror, notebook.cells)
@test notebook.cells[end].output.body == "1"
end

# PlutoTest.jl is only working on Julia version >= 1.6
VERSION >= v"1.6" && @testset "Test Firebasey" begin
Expand Down

0 comments on commit baad1b5

Please sign in to comment.