aboutsummaryrefslogtreecommitdiff
path: root/_plugins/add-anchor-to-code-block-line-numbers.rb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--_plugins/add-anchor-to-code-block-line-numbers.rb2
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|