Closed iirelu closed 5 years ago
Can you post exact commands please?
And post text, not screenshots.
Don't think this is a bug. I seems like you intended to use the --metadata-file
. Files passed via the -H
option are not parsed and included verbatim.
test.textile
:
"hello!"
metadata.yaml
:
---
title: "blah"
---
Command: pandoc pandoc -o out.html test.textile metadata.yaml
Output:
<p>“hello!”</p>
<hr />
<p>title: “blah”<br />
—-</p>
I did indeed think -H was an alias of --metadata-file. I think I got that from an inaccurate stackoverflow post. However, if you change .textile to .md, it works as expected, and most places say you can just throw a metadata.yaml on the end instead of using --metadata-file, so I still think this is a bug.
I did indeed think -H was an alias of --metadata-file.
Nope, see http://pandoc.org/MANUAL.html
and most places say you can just throw a metadata.yaml on the end
That actually only works for markdown files.
Feel free to correct the inaccurate stackoverflow post...
For some reason, pandoc is incapable of detecting a
metadata.yaml
(even when explicitly set via -H) when the only input format being used is textile. Adding an empty markdown file to the beginning of the file list fixes this. Without the empty markdown file, the contents ofmetadata.yaml
are included as if formatted by the textile converter.My version of pandoc is 2.3.1.