Hi,
the rfc4180splitter function from util-prs.lua returns a empty table
when the option to turn the first line into a header is disabled.
The following example from the source
%%%% begin example
\starttext
\startluacode
local mycsvsplitter = utilities.parsers.rfc4180splitter()
local crap = [[
"first","second","third","fourth"
"1","2","3","4"
"a","b","c","d"
"foo","bar""baz","boogie","xyzzy"
]]
local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names)
local list, names = mycsvsplitter(crap) inspect(list) inspect(names)
\stopluacode
\stoptext
%%%% end example
returns these tables:
%%%% begin result
table={
{ "1", "2", "3", "4" },
{ "a", "b", "c", "d" },
{ "foo", "bar\"baz", "boogie", "xyzzy" },
}
table={
"first",
"second",
"third",
"fourth",
}
table={
}
nil
%%%% end result
Wolfgang