luakeys-debug - why are integer indexes wrapped in quotes?
kalekje opened this issue · comments
kalekje commented
Just want to ask why integer indexes are wrapped in quotes when using the debug feature. In my opinion, this is misleading as it makes the user believe they are string indexes.
\luakeysdebug{{1,2,3},{4,5,6}}
-- writes this;
['1'] = {
['1'] = 1,
['2'] = 2,
['3'] = 3,
},
['2'] = {
['1'] = 4,
['2'] = 5,
['3'] = 6,
},
}
Further...
\begin{luacode*}
texio.write_nl(luakeys.parse('{1,2,3},{4,5,6}')[2][2]) -- shows 5 as expected
--texio.write_nl(luakeys.parse('{1,2,3},{4,5,6}')['2']['2']) -- incorrect
\end{luacode*}
Josef Friedrich commented
Thank you for reporting this.