Browse Source

Fix config comment replace regex not to be greedy

pull/1785/head
jlukic 9 years ago
parent
commit
5a1e347ed5
3 changed files with 3 additions and 3 deletions
  1. 2
      tasks/config/project/tasks.js
  2. 2
      tasks/docs/serve.js
  3. 2
      tasks/watch.js

2
tasks/config/project/tasks.js

@ -32,7 +32,7 @@ module.exports = {
// remove all comments from config files (.variable) // remove all comments from config files (.variable)
variables : { variables : {
in : /\/\*[\s\S]+\/\* End Config \*\//m,
in : /\/\*[\s\S]+?\/\* End Config \*\//m,
out : '', out : '',
}, },

2
tasks/docs/serve.js

@ -132,7 +132,7 @@ module.exports = function () {
lessPath = util.replaceExtension(file.path, '.less'); lessPath = util.replaceExtension(file.path, '.less');
lessPath = lessPath.replace(source.site, source.definitions); lessPath = lessPath.replace(source.site, source.definitions);
} }
else if(isDefinition) {
else {
console.log('Change detected in definition'); console.log('Change detected in definition');
lessPath = file.path; lessPath = file.path;
} }

2
tasks/watch.js

@ -122,7 +122,7 @@ module.exports = function(callback) {
lessPath = util.replaceExtension(file.path, '.less'); lessPath = util.replaceExtension(file.path, '.less');
lessPath = lessPath.replace(source.site, source.definitions); lessPath = lessPath.replace(source.site, source.definitions);
} }
else if(isDefinition) {
else {
console.log('Change detected in definition'); console.log('Change detected in definition');
lessPath = file.path; lessPath = file.path;
} }

Loading…
Cancel
Save