Skip to content
Snippets Groups Projects
Commit a174ce30 authored by fauno's avatar fauno
Browse files

Merge branch 'release/0.0.7'

parents abac1ec6 461f9e93
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ class PandocGenerator < Generator ...@@ -43,7 +43,7 @@ class PandocGenerator < Generator
# The command # The command
# Move to the source dir since everything will be relative to # that # Move to the source dir since everything will be relative to # that
pandoc = "pushd \"#{site.config['source']}\" >/dev/null; pandoc #{flags} #{output_flag} #{extra_flags}; popd >/dev/null" pandoc = "pandoc #{flags} #{output_flag} #{extra_flags}"
# Inform what's being done # Inform what's being done
puts pandoc puts pandoc
...@@ -54,11 +54,13 @@ class PandocGenerator < Generator ...@@ -54,11 +54,13 @@ class PandocGenerator < Generator
content << post.content content << post.content
# Do the stuff # Do the stuff
Dir::chdir(site.config['source']) do
Open3::popen3(pandoc) do |stdin, stdout, stderr| Open3::popen3(pandoc) do |stdin, stdout, stderr|
stdin.puts content stdin.puts content
stdin.close stdin.close
STDERR.print stderr.read STDERR.print stderr.read
end end
end
# Skip failed files # Skip failed files
next if not File.exist? filename_with_path next if not File.exist? filename_with_path
...@@ -108,7 +110,8 @@ module JekyllPandocMultipleFormats ...@@ -108,7 +110,8 @@ module JekyllPandocMultipleFormats
flags = "#{@config['pandoc']['flags']} #{@config['pandoc']['site_flags']}" flags = "#{@config['pandoc']['flags']} #{@config['pandoc']['site_flags']}"
output = '' output = ''
Open3::popen3("pushd \"#{@config['source']}\" >/dev/null; pandoc -t html5 #{flags}; popd >/dev/null") do |stdin, stdout, stderr| Dir::chdir(@config['source']) do
Open3::popen3("pandoc -t html5 #{flags}") do |stdin, stdout, stderr|
stdin.puts content stdin.puts content
stdin.close stdin.close
...@@ -116,9 +119,9 @@ module JekyllPandocMultipleFormats ...@@ -116,9 +119,9 @@ module JekyllPandocMultipleFormats
STDERR.print stderr.read STDERR.print stderr.read
end end
end
output output
end end
def matches(ext) def matches(ext)
......
module JekyllPandocMultipleFormats module JekyllPandocMultipleFormats
VERSION = "0.0.6" VERSION = "0.0.7"
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment