diff --git a/src/options.jl b/src/options.jl index f7a5317f..109e0a24 100644 --- a/src/options.jl +++ b/src/options.jl @@ -65,6 +65,8 @@ end function prockey(key) if isa(key, Symbol) || isa(key, String) return :($(string(key)) => nothing) + elseif @capture(key, @raw_str(str_)) + return :($(string(str)) => nothing) elseif @capture(key, (a_ : b_) | (a_ => b_) | (a_ = b_)) return :($(string(a))=>$b) elseif @capture(key, g_...) diff --git a/test/test_options.jl b/test/test_options.jl index e9a1b345..929f9424 100644 --- a/test/test_options.jl +++ b/test/test_options.jl @@ -14,10 +14,10 @@ end a = 1 b = 2 theme = @pgf {color = "white"} - opt = @pgf { xmax = a + b, title = "42", justkey, theme... } + opt = @pgf { xmax = a + b, title = "42", justkey, raw"rawstring", theme... } @test opt["color"] == "white" @test repr_tex(opt) == repr_tex(Options("xmax" => 3, "title" => "42", "justkey" => nothing, - "color" => "white")) + "rawstring" => nothing, "color" => "white")) f(x...) = tuple(x...) y = @pgf f({ look, we, are = f(1, 2, 3), nesting = { stuff = 9 }}) @test length(y) == 1