summaryrefslogtreecommitdiff
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
parent720eb803375a1b31c766f1775fd13c4169ebcfe4 (diff)
allow setting the markdown options per-article
-rwxr-xr-xpagerender.rb6
-rw-r--r--public/bash-arrays.md1
2 files changed, 6 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"
diff --git a/public/bash-arrays.md b/public/bash-arrays.md
index e7f5842..bf27dcb 100644
--- a/public/bash-arrays.md
+++ b/public/bash-arrays.md
@@ -2,6 +2,7 @@ Bash arrays
===========
---
date: "2013-10-13"
+markdown_options: "-markdown_in_html_blocks"
---
Way too many people don't understand Bash arrays. Many of them argue