mirror of
https://github.com/WatchOutNewsAgency/wona.github.com.git
synced 2026-01-01 01:16:26 +00:00
added <div> wrappers to code blocks because rdiscount stupidly wraps <figure> tags with paragraphs. Grr.
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user