blob: 04fbdeaf83865fc48dce631ae97cfdef1c5a960e (
plain) (
tree)
|
|
Jekyll::Hooks.register :documents, :post_render do |doc|
if doc.output_ext == ".html"
code_block_counter = 1
doc.output = doc.output.gsub(/(<\/code><\/pre><\/div><\/div>)/) do |match|
res = match +
'<div class="plaintext-link"><a href="' +
"#{doc.url}.#{code_block_counter}.txt" +
'">plaintext</a></div>'
code_block_counter += 1
res
end
end
end
|