diff --git a/src/runestone.jl b/src/runestone.jl index 826a593..71d3b9c 100644 --- a/src/runestone.jl +++ b/src/runestone.jl @@ -974,7 +974,7 @@ function spaces_in_export_public(ctx::Context, node::Node) state = :expect_identifier elseif state === :expect_identifier state = :expect_comma - if kind(kid) in KSet"Identifier @ MacroName $" || JuliaSyntax.is_operator(kid) + if kind(kid) in KSet"Identifier @ MacroName $ var" || JuliaSyntax.is_operator(kid) any_changes && push!(kids′, kid) accept_node!(ctx, kid) if kind(kid) === K"@" diff --git a/test/runtests.jl b/test/runtests.jl index ef9b102..c8a8acf 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -841,7 +841,7 @@ end @test format_string("quote\nexport \$a, \$b\nend") == "quote\n export \$a, \$b\nend" @test_throws Exception format_string("export \$a") # Non-identifiers - @test format_string("export ^") == "export ^" + @test format_string("export ^, var\"x\"") == "export ^, var\"x\"" end @testset "parsing new syntax" begin