Skip to content

Code Not Included With GitHub Flavored Markdown (gfm) #22

@bloudraak

Description

@bloudraak

Consider the following file hello.c

#include <stdio>
int main()
{
    fprintf(stdout, "Hello World\n");
}

Consider the following markdown document sample.md

Sample Code

```{include=hello.c}

```

Build a PDF using

pandoc --toc \
       --filter ~/.cabal/bin/pandoc-include-code \
       -f gfm \
       -o sample.pdf \
       sample.md 

Open the PDF and notice that the contents of hello.c was not included.

If you call it as follows:

pandoc --toc \
       --filter ~/.cabal/bin/pandoc-include-code \
       -f markdown \
       -o sample.pdf \
       sample.md 

then the content of hello.c is included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions