summaryrefslogtreecommitdiffstats
path: root/lib/templating/replaceShortcuts.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-05-11 14:45:54 +0200
committerSamy Pesse <samypesse@gmail.com>2016-05-11 14:45:54 +0200
commit961d43f085036263edfe064c2107ab27ad62d8fa (patch)
tree49c845d9d9e11e0abaf94094a4aab263921216bb /lib/templating/replaceShortcuts.js
parent7bd49606e3aceb4078258c6693f53bc129eb5b93 (diff)
downloadgitbook-961d43f085036263edfe064c2107ab27ad62d8fa.zip
gitbook-961d43f085036263edfe064c2107ab27ad62d8fa.tar.gz
gitbook-961d43f085036263edfe064c2107ab27ad62d8fa.tar.bz2
Fix #1293: replace block shortcuts when including files
Diffstat (limited to 'lib/templating/replaceShortcuts.js')
-rw-r--r--lib/templating/replaceShortcuts.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/templating/replaceShortcuts.js b/lib/templating/replaceShortcuts.js
index 66ddff3..acdd1b9 100644
--- a/lib/templating/replaceShortcuts.js
+++ b/lib/templating/replaceShortcuts.js
@@ -26,13 +26,13 @@ function applyShortcut(content, shortcut) {
/**
Replace shortcuts from blocks in a string
- @param {TemplateEngine} engine
+ @param {List<TemplateBlock>} engine
@param {String} filePath
@param {String} content
@return {String}
*/
-function replaceShortcuts(engine, filePath, content) {
- var shortcuts = listShortcuts(engine, filePath);
+function replaceShortcuts(blocks, filePath, content) {
+ var shortcuts = listShortcuts(blocks, filePath);
return shortcuts.reduce(applyShortcut, content);
}