Broken formatting on UMD files
Opened this issue · 1 comments
coderaiser commented
I have example.js
:
const fs = require('fs');
const indent = require('indent.js');
const data = fs.readFileSync('./index.js', 'utf8');
console.log(data);
console.log(indent.js(data, {tabString: 4}));
When I run it, I see:
(function(mod) {
'use strict';
if (typeof exports === 'object' && typeof module === 'object') // CommonJS
mod(require('../../lib/codemirror'));
else if (typeof define === 'function' && define.amd) // AMD
define(['../../lib/codemirror'], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
});
(function(mod) {
'use strict';
if (typeof exports === 'object' && typeof module === 'object') // CommonJS
mod(require('../../lib/codemirror'));
else if (typeof define === 'function' && define.amd) // AMD
define(['../../lib/codemirror'], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
});
Would be great to have ability not add windows line endings:
coderaiser commented
Here is possible solution align-spaces.