mirror of
/repos/Prototyper.git
synced 2025-12-30 06:31:32 +01:00
more tests
This commit is contained in:
parent
ae1ba8bda5
commit
cb4e0fc1d0
@ -44,11 +44,15 @@ module.exports = function (markers) {
|
||||
function handTextManipulation(text, promises, handler, callback) {
|
||||
when.all(promises).then(
|
||||
function onSuccess(all_results) {
|
||||
_.forEach(all_results, function loopResults(results) {
|
||||
_.forEach(results, function handleResult(result) {
|
||||
text = handler(text, result);
|
||||
try {
|
||||
_.forEach(all_results, function loopResults(results) {
|
||||
_.forEach(results, function handleResult(result) {
|
||||
text = handler(text, result);
|
||||
});
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
return callback(e);
|
||||
}
|
||||
return callback(null, text);
|
||||
},
|
||||
function onFailure(err) {
|
||||
|
||||
@ -39,34 +39,35 @@ module.exports = function markers(config) {
|
||||
|
||||
|
||||
function createTag(type, collection, name, attribute) {
|
||||
var tag = '<!-- @@' + type + '__' + collection + '_' + name + '_' + attribute + ' -->';
|
||||
if(config.debug) {
|
||||
var tag = '<!-- @@' + type + '__' + collection + '_' + name + '_' + attribute + ' -->';
|
||||
if (config.debug) {
|
||||
console.log('markers.createTag created:', tag);
|
||||
}
|
||||
return tag;
|
||||
}
|
||||
|
||||
return {
|
||||
prefix: marker_prefix,
|
||||
postfix: marker_postfix,
|
||||
createTag:createTag,
|
||||
script_tag:script_tag,
|
||||
script_regexp:script_regexp,
|
||||
style_tag:style_tag,
|
||||
style_regexp:style_regexp,
|
||||
less_tag:less_tag,
|
||||
less_regexp:less_regexp,
|
||||
template_tag:template_tag,
|
||||
template_regexp:template_regexp,
|
||||
markdown_tag:markdown_tag,
|
||||
markdown_regexp:markdown_regexp,
|
||||
remove_tag:remove_tag,
|
||||
createTag: createTag,
|
||||
script_tag: script_tag,
|
||||
script_regexp: script_regexp,
|
||||
style_tag: style_tag,
|
||||
style_regexp: style_regexp,
|
||||
less_tag: less_tag,
|
||||
less_regexp: less_regexp,
|
||||
template_tag: template_tag,
|
||||
template_regexp: template_regexp,
|
||||
markdown_tag: markdown_tag,
|
||||
markdown_regexp: markdown_regexp,
|
||||
remove_tag: remove_tag,
|
||||
// remove_regexp:remove_regexp,
|
||||
import_leftovers_tag:import_leftovers_tag,
|
||||
import_leftovers_regexp:import_leftovers_regexp,
|
||||
import_tag:import_tag,
|
||||
import_regexp:import_regexp,
|
||||
import_strip_regexp:import_strip_regexp,
|
||||
import_file_tag:import_file_tag,
|
||||
import_file_regexp:import_file_regexp
|
||||
import_leftovers_tag: import_leftovers_tag,
|
||||
import_leftovers_regexp: import_leftovers_regexp,
|
||||
import_tag: import_tag,
|
||||
import_regexp: import_regexp,
|
||||
import_strip_regexp: import_strip_regexp,
|
||||
import_file_tag: import_file_tag,
|
||||
import_file_regexp: import_file_regexp
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user