christianvoigt / argdown

a simple syntax for complex argumentation
https://argdown.org
923 stars 30 forks source link

Error with argdown-pandoc-filter #187

Closed slavakurilyak closed 4 years ago

slavakurilyak commented 4 years ago

After running $ pandoc the-debate.md -f markdown -t pdf --filter argdown-filter -o output-file.pdf, I get the following error:

/Users/skurilyak/.nvm/versions/node/v12.8.1/lib/node_modules/@argdown/pandoc-filter/dist/index.js:97
                        request.webComponent?.figureCaption || settings.caption;
                                             ^

SyntaxError: Unexpected token .
    at Module._compile (internal/modules/cjs/loader.js:811:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
    at Module.load (internal/modules/cjs/loader.js:731:32)
    at Function.Module._load (internal/modules/cjs/loader.js:644:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:931:10)
    at internal/main/run_main_module.js:17:11
Error running filter argdown-filter:
Filter returned error status 1
christianvoigt commented 4 years ago

Thanks. It seems like the Typescript-to-Javascript compilation left some Typescript-specific syntax in the Javascript file. This should be easy to fix.

christianvoigt commented 4 years ago

Should be working now if you update to @argdown/pandoc-filter@v1.5.2. I also realized that you have to use --filter argdown-filter.cmd on Windows. I will add that to the docs.