diff options
author | EuAndreh <eu@euandre.org> | 2020-08-15 16:14:43 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-08-15 16:14:43 -0300 |
commit | 7ac4f5c3e205dbfa9c48ab1996d17fa2a69bf1c5 (patch) | |
tree | adc4ac131e083f19209d3ff06b58d32ea7bf5f1a /_plugins/add-anchor-to-code-block-line-numbers.rb | |
parent | TIL on git: add missing link (diff) | |
download | euandre.org-7ac4f5c3e205dbfa9c48ab1996d17fa2a69bf1c5.tar.gz euandre.org-7ac4f5c3e205dbfa9c48ab1996d17fa2a69bf1c5.tar.xz |
Run Jekyll hooks on :pages too
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 d4cf763..ef9f579 100644 --- a/_plugins/add-anchor-to-code-block-line-numbers.rb +++ b/_plugins/add-anchor-to-code-block-line-numbers.rb @@ -1,6 +1,6 @@ PREFIX = '<pre class="lineno">' POSTFIX = '</pre>' -Jekyll::Hooks.register :documents, :post_render do |doc| +Jekyll::Hooks.register [:documents, :pages], :post_render do |doc| if doc.output_ext == ".html" code_block_counter = 1 doc.output = doc.output.gsub(/<pre class="lineno">[\n0-9]+<\/pre>/) do |match| |