Skip to content

Commit

Permalink
Upgrade the js-beautify 1.5.4
Browse files Browse the repository at this point in the history
They pulled in my fix and also fixed another of the bugs I found.
  • Loading branch information
domenic committed Jan 9, 2015
1 parent 13d74e8 commit 63ad249
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions lib/beautify.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ module.exports = function beautify(html) {
// https://github.com/beautify-web/js-beautify/issues/524
var fixNewlines = originalOutput.replace(/(<\/code>|<\/var>|<\/emu-[^>]+>)\n *<\/li>/g, '$1</li>');

// https://github.com/beautify-web/js-beautify/issues/525
var fixExtraSpaces = fixNewlines.replace(/> </g, '> <');

// Remove empty =""s
var withSimplifiedAttributes = fixExtraSpaces.replace(/=""/g, '');
var withSimplifiedAttributes = fixNewlines.replace(/=""/g, '');

return withSimplifiedAttributes;
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"cheerio": "^0.17.0",
"inline-elements": "^0.1.1",
"js-beautify": "domenic/js-beautify#custom-elements-unformatted",
"js-beautify": "^1.5.4",
"pegjs": "^0.8.0"
},
"devDependencies": {
Expand Down

0 comments on commit 63ad249

Please sign in to comment.