wycats / rake-pipeline-web-filters

MIT License
116 stars 36 forks source link

Support spaces around tokens in the require statement for :require_rewrite #13

Closed raghurajah closed 12 years ago

raghurajah commented 12 years ago

Some users have syntactically valid spaces (please don't ask why, I don't know) around the require statement. Like,

require    ( 'octopus')

The require_rewrite was skipping them. This trivial change basically tests for spaces around the open parentheses.

dudleyf commented 12 years ago

:rewrite_requires is a hack. It also doesn't support require statements anywhere except at the beginning of a line. Hopefully a future version of minispade will pass require into the module function, making it unnecessary to preprocess the source. You get points for including a test, though :)