We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8a4a37 commit ab206cbCopy full SHA for ab206cb
base/strings/lazy.jl
@@ -67,7 +67,7 @@ macro lazy_str(text)
67
parts = Any[]
68
lastidx = idx = 1
69
while (idx = findnext('$', text, idx)) !== nothing
70
- lastidx < idx && push!(parts, text[lastidx:idx-1])
+ lastidx < idx && push!(parts, text[lastidx:prevind(text, idx)])
71
idx += 1
72
expr, idx = Meta.parseatom(text, idx; filename=string(__source__.file))
73
push!(parts, esc(expr))
test/strings/basic.jl
@@ -1144,4 +1144,7 @@ end
1144
end
1145
return a
1146
end |> Core.Compiler.is_foldable
1147
+ let i=49248
1148
+ @test String(lazy"PR n°$i") == "PR n°49248"
1149
+ end
1150
0 commit comments