stpettersens / gulp-codo

:tropical_drink: Gulp plug-in to generate documentation for CoffeeScript with codo.
https://libraries.io/npm/gulp-codo
Other
2 stars 1 forks source link

Folders with whitespace. #2

Open Herokid opened 8 years ago

Herokid commented 8 years ago

Hi Sam, in advanced, sorry for my english and thanks for sharing your work (:

I have my web project on a volume that has white spaces in the name. When I use codo from the command line I have no problem because the same shell escape characters. The fact is that when I use the plugin, apparently not escape these characters.

I found a very simple solution:

In the "invokeCodo" function I've added a new variable to define a regular expression.

var options = 'codo ', re = new RegExp(' ', 'g');

Then when you do files.map, use the regular expression for the update the paths.

options += ' ' + files.map(function(f){ return f.path.replace(re, '\\ '); }).join(' ');

Again, thanks for sharing your work

Regards, David.

stpettersens commented 8 years ago

You're welcome and thanks for the feedback. Joe Hildebrand added substantial improvements so he deserves probably most of the credit.

Submit a pull request and I'll merge it in or if you want I can do it and add you to the contributors myself.

Best wishes,

Sam.