diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-06-10 17:45:30 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-06-10 17:45:30 +0200 |
commit | 9c927dcf1377e9f4caa3ed234a9fb5b472ecee50 (patch) | |
tree | d2ca8a49d8d365578bdb4e6506ce1f88e9ce068e /lib/templating/replaceShortcuts.js | |
parent | 7a08b3f109d104903406a38cfd33aa642d30211f (diff) | |
download | gitbook-9c927dcf1377e9f4caa3ed234a9fb5b472ecee50.zip gitbook-9c927dcf1377e9f4caa3ed234a9fb5b472ecee50.tar.gz gitbook-9c927dcf1377e9f4caa3ed234a9fb5b472ecee50.tar.bz2 |
Fix #1374 and #1360: apply transform of conrefsLoader using a string, not a buffer
Diffstat (limited to 'lib/templating/replaceShortcuts.js')
-rw-r--r-- | lib/templating/replaceShortcuts.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/templating/replaceShortcuts.js b/lib/templating/replaceShortcuts.js index acdd1b9..1cfdbf0 100644 --- a/lib/templating/replaceShortcuts.js +++ b/lib/templating/replaceShortcuts.js @@ -1,12 +1,12 @@ var escapeStringRegexp = require('escape-string-regexp'); var listShortcuts = require('./listShortcuts'); -/* - Apply a shortcut of block to a template - @param {String} content - @param {Shortcut} shortcut - @return {String} -*/ +/** + * Apply a shortcut of block to a template + * @param {String} content + * @param {Shortcut} shortcut + * @return {String} + */ function applyShortcut(content, shortcut) { var start = shortcut.getStart(); var end = shortcut.getEnd(); @@ -24,13 +24,13 @@ function applyShortcut(content, shortcut) { } /** - Replace shortcuts from blocks in a string - - @param {List<TemplateBlock>} engine - @param {String} filePath - @param {String} content - @return {String} -*/ + * Replace shortcuts from blocks in a string + * + * @param {List<TemplateBlock>} engine + * @param {String} filePath + * @param {String} content + * @return {String} + */ function replaceShortcuts(blocks, filePath, content) { var shortcuts = listShortcuts(blocks, filePath); return shortcuts.reduce(applyShortcut, content); |