summaryrefslogtreecommitdiff
path: root/pagerender.rb
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 23:30:40 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 23:30:40 -0500
commit8f65e334b48fe892db0bd47eff4886b9e4db54c5 (patch)
treefc118de095715d725ef6a5189621f17ce94ddbac /pagerender.rb
parent720eb803375a1b31c766f1775fd13c4169ebcfe4 (diff)
allow setting the markdown options per-article
Diffstat (limited to 'pagerender.rb')
-rwxr-xr-xpagerender.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/pagerender.rb b/pagerender.rb
index 3edaaaf..67c5aab 100755
--- a/pagerender.rb
+++ b/pagerender.rb
@@ -18,7 +18,11 @@ infile = ARGV.first
Pandoc::prog='pandoc'
input = File.read(infile)
-doc = Pandoc::load('markdown-markdown_in_html_blocks', input)
+doc = Pandoc::load('markdown', input)
+
+if doc['markdown_options']
+ doc = Pandoc::load('markdown'+doc['markdown_options'], input)
+end
@title = doc['title'] || input.split("\n",2).first
@author = doc['author'] || "Luke Shumaker"