Closed pablomayobre closed 9 years ago
That's an idea. Does Lua allow you to define sequential arrays in an unordered way? Example:
local t = {
"one", "two",
three="three",
"four", "five"
}
for _, v in ipairs(t) do
print(v) -- one two four five OR one two?
end
If that is consistent, then I could simplify some of the markup for sure.
What you posted is valid as I understood from all the manuals and things I've read
EDIT: I found it here
Aye, running that code on lua.org's cgi demo produces "one two four five". I may revise the markup file later today and add a note in the readme indicating that the first item in a sequence will always be the object declaration, the second will be a value if a value is expected and if the value is not a table or a function, and the rest onward (that are tables) are child objects.
Well I editted the comment and added a resource that says that it is completely valid... you may want to check it anyway
Perfect, thanks. I've gone ahead and updated the markup file and added a note to the README.
Shall this be closed and we leave the discussion in issue #4 ?
Yeah, that makes sense.
In the markup you declare the type o each segment or child like this:
I think that it may be better to have the type mandatory being the first element:
It looks more like HTML, also you avoid writing type at every node hahaha