owickstrom / pandoc-include-code

A Pandoc filter for including code from source files
Mozilla Public License 2.0
139 stars 18 forks source link

Error in $: mempty #13

Open anatoliykmetyuk opened 6 years ago

anatoliykmetyuk commented 6 years ago
echo -e "\`\`\`{include=\"script.py\"}\n\`\`\`" > dummy.md
echo "println(\"Hello World\")" > script.py
pandoc --filter pandoc-include-code dummy.md

The above sequence of commands gives the following error:

pandoc-include-code: Error in $: mempty
CallStack (from HasCallStack):
  error, called at ./Text/Pandoc/JSON.hs:111:48 in pandoc-types-1.17.5.1-9cpG8mYeMl77rDwdvssSq4:Text.Pandoc.JSON
pandoc: Error running filter pandoc-include-code
Filter returned error status 1
bloudraak commented 5 years ago

Running into the same issue when running it against pandoc 1.12

$ pandoc version
pandoc 1.12.2.1
Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1.
Syntax highlighting is supported for the following languages:
    actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
    clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
    diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
    fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc,
    javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell,
    lua, makefile, mandoc, markdown, matlab, maxima, metafont, mips, modelines,
    modula2, modula3, monobasic, nasm, noweb, objectivec, objectivecpp, ocaml,
    octave, pascal, perl, php, pike, postscript, prolog, python, r,
    relaxngcompact, rhtml, roff, ruby, rust, scala, scheme, sci, sed, sgml, sql,
    sqlmysql, sqlpostgresql, tcl, texinfo, verilog, vhdl, xml, xorg, xslt, xul,
    yacc, yaml
Default user data directory: /home/werners/.pandoc
Copyright (C) 2006-2013 John MacFarlane
Web:  http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions.  There is no
warranty, not even for merchantability or fitness for a particular purpose.

I installed it using cabal install per README document.

owickstrom commented 5 years ago

Can you try with a later version of Pandoc? I cannot reproduce this with Pandoc 2.

bloudraak commented 5 years ago

I upgraded to pandoc 2.1.2 and can no longer reproduce it.