[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: confused by the wierd "q" option of "string.format".
- From: Michal Kottman <k0mpjut0r@...>
- Date: Fri, 8 Jul 2011 14:18:45 +0200
> 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.