[dev-context] Quoting problems in grph-con.lua

Hans Hagen j.hagen at xs4all.nl
Sat Apr 20 23:11:25 CEST 2019


On 4/19/2019 9:06 PM, Kevin Boulain wrote:
> Hi,
> 
>  From my understanding, there are some superfluous quotes in
> context/base/mkiv/grph-con.lua, cancelling the proper quoting done by
> validcommand in context/base/mkiv/util-sbx.lua.
> 
> For my document, it tries to run something like (the space in the
> 'Google Drive' directory breaks the generation):
> inkscape ""[...]/Google Drive/[...].svg"" --export-dpi=600
> --export-pdf=""[...]/Google Drive/[...].svg.pdf""
> 
> Applying this patch fixes the double quotes issue:
>       local runner = sandbox.registerrunner {
>           name     = "svg to something",
>           program  = "inkscape",
>           template = longtostring [[
> -            "%oldname%"
> +            %oldname%
>               --export-dpi=%resolution%
> -            --export-%format%="%newname%"
> +            --export-%format%=%newname%
>           ]],
> 
> However, it seems there are more similar quotes in the other templates
> of the file.

I'm a bit reluctant to change this as it can break existing workflows.

What if you use "%[oldname]%" and don't feed an quoted argument?


> mtx-context     | current version: 2019.04.16 08:54
> 
> (I hope this is the proper way of reporting.)
> 
> Regards.
> _______________________________________________
> dev-context mailing list
> dev-context at ntg.nl
> https://mailman.ntg.nl/mailman/listinfo/dev-context
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the dev-context mailing list