diff options
author | EuAndreh <eu@euandre.org> | 2020-10-10 19:29:58 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-10-10 19:30:12 -0300 |
commit | d37970ccd647b89a790c0944611f3e3be1f05eaf (patch) | |
tree | 3e19e8b77ddee7a3c3db057bcc75568e212efecb /_plugins/add-anchor-to-code-block-line-numbers.rb | |
parent | Fix home page entry listing (diff) | |
download | euandre.org-d37970ccd647b89a790c0944611f3e3be1f05eaf.tar.gz euandre.org-d37970ccd647b89a790c0944611f3e3be1f05eaf.tar.xz |
Use Jekyll to output slides HTML files
Diffstat (limited to '_plugins/add-anchor-to-code-block-line-numbers.rb')
-rw-r--r-- | _plugins/add-anchor-to-code-block-line-numbers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/_plugins/add-anchor-to-code-block-line-numbers.rb b/_plugins/add-anchor-to-code-block-line-numbers.rb index ef9f579..ec6f0a8 100644 --- a/_plugins/add-anchor-to-code-block-line-numbers.rb +++ b/_plugins/add-anchor-to-code-block-line-numbers.rb @@ -1,7 +1,7 @@ PREFIX = '<pre class="lineno">' POSTFIX = '</pre>' Jekyll::Hooks.register [:documents, :pages], :post_render do |doc| - if doc.output_ext == ".html" + if doc.output_ext == ".html" && doc.type != :slides code_block_counter = 1 doc.output = doc.output.gsub(/<pre class="lineno">[\n0-9]+<\/pre>/) do |match| line_numbers = match |