lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> by the way, I found a bug (or not?):
> s = [[
>
> two new lines before me]]
> print (string.format('%q', s))
>
> OUTPUT:
> "\
> two new lines before me"

Before saying "bug", please consult the Lua reference manual. Quoting
section 2.1:

For convenience, when the opening long bracket is immediately followed
by a newline, the newline is not included in the string.