Commit 92c12dca authored by Nikolay Gromov's avatar Nikolay Gromov

Автоматизация: исправления

parent c95d035e
...@@ -158,6 +158,9 @@ function copyImg(cb) { ...@@ -158,6 +158,9 @@ function copyImg(cb) {
cb(); cb();
})(); })();
} }
else {
cb();
}
} }
exports.copyImg = copyImg; exports.copyImg = copyImg;
...@@ -505,7 +508,7 @@ function filterShowCode(text, options) { ...@@ -505,7 +508,7 @@ function filterShowCode(text, options) {
var result = '<pre class="code">\n'; var result = '<pre class="code">\n';
if (typeof(options['first-line']) !== 'undefined') result = result + '<code>' + options['first-line'] + '</code>\n'; if (typeof(options['first-line']) !== 'undefined') result = result + '<code>' + options['first-line'] + '</code>\n';
for (var i = 0; i < (lines.length - 1); i++) { // (lines.length - 1) для срезания последней строки (пустая) for (var i = 0; i < (lines.length - 1); i++) { // (lines.length - 1) для срезания последней строки (пустая)
result = result + '<code>' + lines[i] + '</code>\n'; result = result + '<code>' + lines[i].replace(/</gm, '&lt;') + '</code>\n';
} }
result = result + '</pre>\n'; result = result + '</pre>\n';
result = result.replace(/<code><\/code>/g, '<code>&nbsp;</code>'); result = result.replace(/<code><\/code>/g, '<code>&nbsp;</code>');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment