wycats / rake-pipeline-web-filters

MIT License
116 stars 36 forks source link

Minispade code wrapper should deal with last-line being a comment #17

Closed raghurajah closed 12 years ago

raghurajah commented 12 years ago

If the code to be registered has a comment on the last line, the closing part of the registration wrapper becomes a comment as well, resulting in invalid code.

alert('hello world');
// Hello World

results in,

minispade.register('module_id', function() {alert('hello world');
// Hello World});

Added a new line to the code during registration to deal with a comment as the last line of the code. Now, the registration looks like this,

minispade.register('module_id', function() {alert('hello world');
// Hello World
});