diff options
author | Brian Chen <[email protected]> | 2017-11-30 06:15:52 -0500 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-11-30 12:15:52 +0100 |
commit | e69da7a4cb725987f153707bf2fc59c135007e2a (patch) | |
tree | c3eab00b91bdbc6d4ed2f9da3b43e1c63909f859 /helpers/general_test.go | |
parent | e7652180a13ce149041c48a1c2754c471df569c8 (diff) | |
download | hugo-e69da7a4cb725987f153707bf2fc59c135007e2a.tar.gz hugo-e69da7a4cb725987f153707bf2fc59c135007e2a.zip |
Add Pandoc support, refactor external helpers
Recognize the Pandoc format under the file extension .pandoc or .pdc,
and shell out to pandoc as an external helper to format Pandoc content.
Refactor out repeated code with external helpers. Change the error
output formatting. I did not see any of the external helpers print the
string "<input>" to represent stdin as a file; just prepending the file
name to error output is more general and doesn't sacrifice that much in
terms of readability.
Closes #234
Diffstat (limited to 'helpers/general_test.go')
-rw-r--r-- | helpers/general_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/helpers/general_test.go b/helpers/general_test.go index 561f59522..2bca632e0 100644 --- a/helpers/general_test.go +++ b/helpers/general_test.go @@ -34,6 +34,8 @@ func TestGuessType(t *testing.T) { {"adoc", "asciidoc"}, {"ad", "asciidoc"}, {"rst", "rst"}, + {"pandoc", "pandoc"}, + {"pdc", "pandoc"}, {"mmark", "mmark"}, {"html", "html"}, {"htm", "html"}, |