aboutsummaryrefslogtreecommitdiff
path: root/plugins/include_code.rb
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-07-19 18:00:56 -0400
committerBrandon Mathis <brandon@imathis.com>2011-07-19 18:00:56 -0400
commit6f646e7290114721a1b4d6b49f25496ad8d7ca7e (patch)
tree7034d36e6497ec026c4ad202e69cf0bdb993315d /plugins/include_code.rb
parentcc1cfa56b200a93532fb392d96d85426fcc91f38 (diff)
downloadmy_new_personal_website-6f646e7290114721a1b4d6b49f25496ad8d7ca7e.tar.xz
my_new_personal_website-6f646e7290114721a1b4d6b49f25496ad8d7ca7e.zip
added <div> wrappers to code blocks because rdiscount stupidly wraps <figure> tags with paragraphs. Grr.
Diffstat (limited to 'plugins/include_code.rb')
-rw-r--r--plugins/include_code.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/include_code.rb b/plugins/include_code.rb
index b063f14f..72a74ac7 100644
--- a/plugins/include_code.rb
+++ b/plugins/include_code.rb
@@ -40,8 +40,8 @@ module Jekyll
code = file.read
file_type = file.extname
url = "#{context.registers[:site].config['url']}/#{code_dir}/#{@file}"
- source = "<figure role=code><figcaption><span>#{file.basename}</span> <a href='#{url}'>download</a></figcaption>\n"
- source += "{% highlight #{file_type} %}\n" + code + "\n{% endhighlight %}</figure>"
+ source = "<div><figure role=code><figcaption><span>#{file.basename}</span> <a href='#{url}'>download</a></figcaption>\n"
+ source += "{% highlight #{file_type} %}\n" + code + "\n{% endhighlight %}</figure></div>"
partial = Liquid::Template.parse(source)
context.stack do
partial.render(context)