Open thoj opened 4 years ago
I always test with: Lua Live Demo And it produces the same result as NeoLua.
The reason is you commented the last closing string out. For the neolua the whole line is a comment.
What lua-interpreter did you use? Version?
Weird. I tried with Lua 5.1.5 and got the above deprecated message.
tj@ami:~$ lua test.lua
lua: test.lua:7: nesting of [[...]] is deprecated near '['
tj@ami:~$ lua -v
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
tj@ami:~$ lua5.3 test.lua
Do not show me this
Multiline string
Strange that lua would let you shoot yourself in the foot like that without even a warning.
Interesting...
I have no idea, which way is the best?
Hmm yeah this is a quite interesting issue. The best in my opinion would be a warning.
NeoLua Version: 13.11
Example to reproduce:
Hi i ran into this when i used
--[[ Some code something = [[ long string ]] Some Code <-- this executed --]] Some more code
I got really confused until i tried with normal lua interpeter where i got: lua: [string ""]:5: nesting of [[...]] is deprecated near '['
I think NeoLua also should make nesting [[...]] an error.
Note for others: You should enclose long strings in [=[...]=], [==[...]==], [===[...]===], etc to avoid this.