Hi,

in the following example the space before the “one” in the line

  \ctxlua{userdata.commalist(" one, two, three")}

is visible in the output. I guess this counts as bug because in the assignment
list the space before “a=x” is removed.


Example:

\starttext

\startluacode

userdata = userdata or {}

function userdata.commalist(list)
        local list = utilities.parsers.settings_to_array(list)
        context.starttabulate()
        for index, value in next, list do
                context.NC()
                        context.quotation(index)
                context.NC()
                        context.quotation(value)
                context.NC()
                context.NR()
        end
        context.stoptabulate()
end

function userdata.parameters(list)
        local list = utilities.parsers.settings_to_hash(list)
        context.starttabulate()
        for key, value in next, list do
                context.NC()
                        context.quotation(key)
                context.NC()
                        context.quotation(value)
                context.NC()
                context.NR()
        end
        context.stoptabulate()
end

\stopluacode

\ctxlua{userdata.commalist("one,two,three")}
\ctxlua{userdata.commalist(" one, two, three")}
\ctxlua{userdata.parameters("a=x,b=y,c=z")}
\ctxlua{userdata.parameters(" a=x, b=y, c=z")}

\stoptext

Wolfgang
_______________________________________________
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context

Reply via email to