Skip to content

Commit

Permalink
Editorial: Consistently style lists with spaces inside
Browse files Browse the repository at this point in the history
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
bterlson committed Dec 10, 2015
1 parent 06998ea commit bb7f0c1
Showing 1 changed file with 121 additions and 121 deletions.
Loading

0 comments on commit bb7f0c1

Please sign in to comment.