diff --git a/lib/scripts/pdf_a4_portrait.js b/lib/scripts/pdf_a4_portrait.js index cf089b8..a9197c4 100755 --- a/lib/scripts/pdf_a4_portrait.js +++ b/lib/scripts/pdf_a4_portrait.js @@ -156,8 +156,8 @@ function createSection (section, content, options) { if (pageNum === 1 && !html) html = o.first || c.first if (pageNum === numPages && !html) html = o.last || c.last return (html || o.default || c.default || '') - .replace('{{page}}', pageNum) - .replace('{{pages}}', numPages) + content.styles + .replace(/{{page}}/g, pageNum) + .replace(/{{pages}}/g, numPages) + content.styles }) } }