pretty
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -11,3 +11,3 @@ /* | ||
var ignore = ['code', 'pre', 'em', 'strong', 'span']; | ||
var unformatted = ['code', 'pre', 'em', 'strong', 'span']; | ||
@@ -19,3 +19,3 @@ module.exports = function(src) { | ||
indent_inner_html: true, | ||
unformatted: ignore | ||
unformatted: unformatted | ||
}) | ||
@@ -25,3 +25,3 @@ // Remove any empty lines at the top of a file. | ||
// Normalize and condense all newlines | ||
.replace(/(\r\n|\n\r|\n|\r){2,}/g, '\n') | ||
.replace(/(\r\n|\n){2,}/g, '\n') | ||
// fix multiline, Bootstrap-style comments | ||
@@ -44,3 +44,5 @@ .replace(/(\s*)(<!--.+)\s*(===.+)/g, '$1$2$1$3') | ||
// Bring closing comments up to the same line as closing tag. | ||
.replace(/\s*(<!--\s*\/.+)/g, '$1'); | ||
.replace(/\s*(<!--\s*\/.+)/g, '$1') | ||
// Add a space after some inline elements, since prettifying strips them sometimes | ||
.replace(/(<\/(a|small|span|strong|em)>(?:(?!,)))/g, '$1 '); | ||
}; |
{ | ||
"name": "pretty", | ||
"description": "Some tweaks for beautifying HTML with js-beautify according to my preferences.", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"homepage": "https://github.com/jonschlinkert/pretty", | ||
@@ -6,0 +6,0 @@ "author": { |
5482
78