Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: Consistently style lists with spaces inside
var fs = require('fs'); var spec = fs.readFileSync('./spec.html', 'utf8'); spec = spec.replace(/(«)(.*?)(»)/g, function (match, start, contents, end) { if (match.trim().length === 0) { contents = " "; } else { if (contents[0] !== " ") { contents = " " + contents; } if(contents[contents.length - 1] !== " ") { contents = contents + " "; } } return start + contents + end; }) fs.writeFileSync('./spec.html', spec);
- Loading branch information