© Thomas Mailund 2019
T. MailundIntroducing Markdown and Pandochttps://doi.org/10.1007/978-1-4842-5149-2_10

10. Preprocessing

Thomas Mailund1 
(1)
Aarhus N, Denmark
 

Markdown is just a plain text document, and you can do any rewriting of that text before you pass it through Pandoc. Any rewriting of the text before you give it to Pandoc is called preprocessing . Pandoc will read from standard input, so we can pipe the result of preprocessing into it on the command line (see Figure 10-1).

Assuming that the preprocessor takes the input file as input and that it writes its output to standard out, then a pipeline can look like this:
preprocessor infile.md | \
   pandoc --from markdown ... -o outfile

You need to tell Pandoc that it is getting Markdown as input ...

Get Introducing Markdown and Pandoc: Using Markup Language and Document Converter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.