html-minifier.git
11 years agotests for 6e5005ef7ed7c3dd9baf6ecc39c3ec1b2470b068
sndrs [Thu, 13 Jun 2013 14:33:13 +0000 (15:33 +0100)]
tests for 6e5005ef7ed7c3dd9baf6ecc39c3ec1b2470b068

11 years agoadd code, kbd and quote to tags with space around them
Alex Sanders [Thu, 13 Jun 2013 12:35:49 +0000 (14:35 +0200)]
add code, kbd and quote to tags with space around them

these tags get cinched up currently, e.g. <p>here's some<code>code</code></p> and <p>I said<q>yes!<q>and left.<p>

11 years agoMerge pull request #61 from mathiasbynens/gh-pages
Juriy Zaytsev [Tue, 14 May 2013 17:47:47 +0000 (10:47 -0700)]
Merge pull request #61 from mathiasbynens/gh-pages

More robust check of unquoted attribute values

11 years agoImprove `canRemoveAttributeQuotes`
Mathias Bynens [Tue, 14 May 2013 16:33:08 +0000 (18:33 +0200)]
Improve `canRemoveAttributeQuotes`

See http://mathiasbynens.be/notes/unquoted-attribute-values for how browsers behave when it comes to unquoted attribute values, and what the HTML spec (based on pre-existing behavior) says about it.

Closes #60 and #61.

11 years agoMerge pull request #59 from stephenplusplus/gh-pages
Juriy Zaytsev [Tue, 14 May 2013 03:47:18 +0000 (20:47 -0700)]
Merge pull request #59 from stephenplusplus/gh-pages

Add HTML5 as an option

11 years agoHTML5 as an option.
Stephen Sawchuk [Tue, 14 May 2013 03:09:09 +0000 (23:09 -0400)]
HTML5 as an option.

11 years agoUpdate to 0.5.2
kangax [Mon, 13 May 2013 00:05:36 +0000 (20:05 -0400)]
Update to 0.5.2

11 years agoMerge pull request #57 from sindresorhus/patch-1
Juriy Zaytsev [Sun, 12 May 2013 21:14:05 +0000 (14:14 -0700)]
Merge pull request #57 from sindresorhus/patch-1

NPM package doesn't work since `dist` folder is ignored

11 years agoNPM package doesn't work since `dist` folder is ignored
Sindre Sorhus [Sun, 12 May 2013 20:49:43 +0000 (23:49 +0300)]
NPM package doesn't work since `dist` folder is ignored

and `main` was changed to the `dist` folder

11 years agoVersion 0.5.1
kangax [Sun, 12 May 2013 17:17:50 +0000 (13:17 -0400)]
Version 0.5.1

11 years agoUpdate distribution file
kangax [Sun, 12 May 2013 17:09:42 +0000 (13:09 -0400)]
Update distribution file

11 years agoMenu is no longer deprecated in HTML5. Closes #23
kangax [Sat, 11 May 2013 19:12:41 +0000 (15:12 -0400)]
Menu is no longer deprecated in HTML5. Closes #23

11 years agoAdd another test
kangax [Sat, 11 May 2013 19:12:01 +0000 (15:12 -0400)]
Add another test

11 years agoAdd more tests
kangax [Sat, 11 May 2013 19:09:33 +0000 (15:09 -0400)]
Add more tests

11 years agoAdd more tests based on issues reported by users
kangax [Sat, 11 May 2013 19:08:05 +0000 (15:08 -0400)]
Add more tests based on issues reported by users

11 years agoMake parser ignore block elements in inline elements (allowed in HTML5, not HTML4...
kangax [Sat, 11 May 2013 19:05:42 +0000 (15:05 -0400)]
Make parser ignore block elements in inline elements (allowed in HTML5, not HTML4). Closes #51. Closes #52. Closes #54.

11 years agoMerge pull request #50 from cometcult/prefix_fix_close
Juriy Zaytsev [Sat, 11 May 2013 18:56:13 +0000 (11:56 -0700)]
Merge pull request #50 from cometcult/prefix_fix_close

Fix minifier issue with prefixed tags (closing)

11 years agoFix minifier issue with prefixed tags (closing)
Even André Fiskvik [Thu, 18 Apr 2013 09:43:53 +0000 (11:43 +0200)]
Fix minifier issue with prefixed tags (closing)

11 years agoMerge pull request #43 from willfarrell/gh-pages
Juriy Zaytsev [Mon, 8 Apr 2013 08:16:22 +0000 (01:16 -0700)]
Merge pull request #43 from willfarrell/gh-pages

Smarter collapseWhitespace - preserver space around inline tags

11 years agoSmarter collapseWhitespace - preserver space around inline tags
will Farrell [Mon, 8 Apr 2013 00:34:49 +0000 (20:34 -0400)]
Smarter collapseWhitespace - preserver space around inline tags

11 years agoMerge pull request #42 from sindresorhus/patch-1
Juriy Zaytsev [Sun, 7 Apr 2013 23:41:59 +0000 (16:41 -0700)]
Merge pull request #42 from sindresorhus/patch-1

npmignore unneeded files

11 years agonpmignore unneeded files
Sindre Sorhus [Sun, 7 Apr 2013 23:31:45 +0000 (02:31 +0300)]
npmignore unneeded files

11 years agoLint minifier, linter via JSHint
kangax [Wed, 3 Apr 2013 12:13:17 +0000 (14:13 +0200)]
Lint minifier, linter via JSHint

11 years agoCorrect package.json
kangax [Tue, 2 Apr 2013 12:44:39 +0000 (14:44 +0200)]
Correct package.json

11 years agoUpdate license, fix package.json
kangax [Tue, 2 Apr 2013 12:35:20 +0000 (14:35 +0200)]
Update license, fix package.json

11 years agoAdd lint tests
kangax [Tue, 2 Apr 2013 12:29:38 +0000 (14:29 +0200)]
Add lint tests

11 years agoAdd .gitignore
kangax [Tue, 2 Apr 2013 12:23:58 +0000 (14:23 +0200)]
Add .gitignore

11 years agoSet up travis hook
kangax [Tue, 2 Apr 2013 12:23:19 +0000 (14:23 +0200)]
Set up travis hook

11 years agoUpdate license
kangax [Tue, 2 Apr 2013 12:23:12 +0000 (14:23 +0200)]
Update license

11 years agoPort tests to run on node, add dist/all.js
kangax [Tue, 2 Apr 2013 12:22:52 +0000 (14:22 +0200)]
Port tests to run on node, add dist/all.js

11 years agoMerge pull request #38 from willfarrell/gh-pages
Juriy Zaytsev [Tue, 2 Apr 2013 11:52:25 +0000 (04:52 -0700)]
Merge pull request #38 from willfarrell/gh-pages

IE Bug Fix

11 years agoIE Bug Fix
will Farrell [Tue, 2 Apr 2013 11:47:58 +0000 (08:47 -0300)]
IE Bug Fix

Bug fix related tohttps://github.com/gruntjs/grunt-contrib-htmlmin/issues/13#issuecomment-15769874

11 years agoMerge pull request #37 from sohira/fix-prefix
Juriy Zaytsev [Sun, 10 Mar 2013 20:30:03 +0000 (13:30 -0700)]
Merge pull request #37 from sohira/fix-prefix

Fix prefix in element

11 years agoFix prefix in element
Shinya Ohira [Sat, 9 Mar 2013 17:29:06 +0000 (02:29 +0900)]
Fix prefix in element

12 years agoMerge pull request #30 from stereobooster/gh-pages
Juriy Zaytsev [Tue, 22 May 2012 09:53:51 +0000 (02:53 -0700)]
Merge pull request #30 from stereobooster/gh-pages

Update qunit.

12 years agouse this instead of window
slavic [Mon, 21 May 2012 23:11:32 +0000 (02:11 +0300)]
use this instead of window

12 years agoupdate qunit
slavic [Mon, 21 May 2012 23:10:25 +0000 (02:10 +0300)]
update qunit

12 years agoMerge pull request #29 from stereobooster/gh-pages
Juriy Zaytsev [Mon, 14 May 2012 10:50:58 +0000 (03:50 -0700)]
Merge pull request #29 from stereobooster/gh-pages

Improvements to CommonJS support.

12 years agomove tests to external files, so they can be launched on the server-side
stereobooster [Mon, 14 May 2012 08:10:36 +0000 (11:10 +0300)]
move tests to external files, so they can be launched on the server-side

12 years agoexports does not contain console object
slavic [Thu, 10 May 2012 20:20:04 +0000 (23:20 +0300)]
exports does not contain console object

12 years agoBumping version again for npm.
kangax [Mon, 8 Aug 2011 22:53:46 +0000 (18:53 -0400)]
Bumping version again for npm.

12 years agoUpdate package.json
kangax [Mon, 8 Aug 2011 22:52:55 +0000 (18:52 -0400)]
Update package.json

12 years agoMerge pull request #27 from crcn/gh-pages
Juriy Zaytsev [Mon, 5 Mar 2012 00:44:58 +0000 (16:44 -0800)]
Merge pull request #27 from crcn/gh-pages

Add support for custom canTrimWhitespace & canCollapseWhitespace options.

12 years agoability to customize canCollapseWhitespace & canTrimWhitespace
Craig Condon [Wed, 29 Feb 2012 06:52:56 +0000 (00:52 -0600)]
ability to customize canCollapseWhitespace & canTrimWhitespace

13 years agoBumping version for npm.
kangax [Mon, 8 Aug 2011 22:42:37 +0000 (18:42 -0400)]
Bumping version for npm.

13 years agoUpdate README to mention npm-based installation.
kangax [Fri, 5 Aug 2011 22:46:37 +0000 (18:46 -0400)]
Update README to mention npm-based installation.

13 years agoFix version and description in package.json, update urls to point to original repo.
kangax [Fri, 5 Aug 2011 22:44:15 +0000 (18:44 -0400)]
Fix version and description in package.json, update urls to point to original repo.

13 years agoModified to work with node and potentially npm.
Hugo Wetterberg [Fri, 5 Aug 2011 13:48:20 +0000 (15:48 +0200)]
Modified to work with node and potentially npm.

13 years agoFixed issue #13 - Whitespace is munged in elements that are descendants of <pre>
Gilmore Davidson [Sun, 27 Feb 2011 09:24:40 +0000 (20:24 +1100)]
Fixed issue #13 - Whitespace is munged in elements that are descendants of <pre>

13 years agoAdd option to remove type="text/css" attributes from <style> and <link> elements...
kangax [Sat, 27 Nov 2010 07:39:15 +0000 (02:39 -0500)]
Add option to remove type="text/css" attributes from <style> and <link> elements. Thanks @mathias for suggestion.

14 years agoMove todo items to github issues.
Juriy Zaytsev [Mon, 17 May 2010 04:51:36 +0000 (00:51 -0400)]
Move todo items to github issues.

14 years agoMake lint report repeating <br> elements and "&nbsp;" sequences. Rephrase report...
Juriy Zaytsev [Mon, 22 Mar 2010 03:16:44 +0000 (23:16 -0400)]
Make lint report repeating <br> elements and "&nbsp;" sequences. Rephrase report messages and number them. Bump version to 0.42.

14 years agoAdd new option — "removeScriptTypeAttribute", which removes `type="text/javascript...
Juriy Zaytsev [Fri, 19 Mar 2010 20:07:15 +0000 (16:07 -0400)]
Add new option — "removeScriptTypeAttribute", which removes `type="text/javascript"` from script elements (à la HTML5). This optimization is currently marked as unsafe. Bump version to 0.41.

14 years agoAdd link to test suite in readme.
Juriy Zaytsev [Fri, 19 Mar 2010 19:27:57 +0000 (15:27 -0400)]
Add link to test suite in readme.

14 years agoAdd bug with <pre><code>...</code></pre> reported by V1.
Juriy Zaytsev [Tue, 16 Mar 2010 15:49:09 +0000 (11:49 -0400)]
Add bug with <pre><code>...</code></pre> reported by V1.

14 years agoStrip trailing ";" from event attributes (onclick, onmouseover, etc.).
Juriy Zaytsev [Mon, 15 Mar 2010 18:01:43 +0000 (14:01 -0400)]
Strip trailing ";" from event attributes (onclick, onmouseover, etc.).

14 years agoAdd simple V8 perf. test (minifying amazon home page).
Juriy Zaytsev [Mon, 15 Mar 2010 17:52:20 +0000 (13:52 -0400)]
Add simple V8 perf. test (minifying amazon home page).

14 years agoStrip trailing ";" from style attributes (this allows to strip quotes from values...
Juriy Zaytsev [Mon, 15 Mar 2010 17:46:39 +0000 (13:46 -0400)]
Strip trailing ";" from style attributes (this allows to strip quotes from values like "display:none;").

14 years agoarea's shape="rect" is a default attribute (strip it as part of "removeRedundantAttri...
Juriy Zaytsev [Sun, 14 Mar 2010 18:23:25 +0000 (14:23 -0400)]
area's shape="rect" is a default attribute (strip it as part of "removeRedundantAttribute" option).

14 years agoMake it possible to quickly select "all", "none" or "safe" options.
Juriy Zaytsev [Sat, 13 Mar 2010 23:41:31 +0000 (18:41 -0500)]
Make it possible to quickly select "all", "none" or "safe" options.

14 years agoTrim whitespace in Number-type attributes (e.g. rows, cols in TEXTAREA; tabindex...
Juriy Zaytsev [Sat, 13 Mar 2010 22:57:32 +0000 (17:57 -0500)]
Trim whitespace in Number-type attributes (e.g. rows, cols in TEXTAREA; tabindex in A, BUTTON, etc.).
Make sure URI and Number -type attributes are matched on proper elements (e.g. <head profile="..."> should be trimmed, but not <mytag profile="...">x</mytag>).

14 years agoTrim whitespace in style attributes.
Juriy Zaytsev [Sat, 13 Mar 2010 22:16:56 +0000 (17:16 -0500)]
Trim whitespace in style attributes.

14 years agoTrim whitespace in attribute values. For now, only in those with %URI; type: href...
Juriy Zaytsev [Fri, 12 Mar 2010 17:42:06 +0000 (12:42 -0500)]
Trim whitespace in attribute values. For now, only in those with %URI; type: href, src, action, etc.

14 years agoMinifier now removes insignificant whitespace in conditional comments.
Juriy Zaytsev [Thu, 11 Mar 2010 17:06:41 +0000 (12:06 -0500)]
Minifier now removes insignificant whitespace in conditional comments.

14 years agoStart testing HTMLLint. Add detection of href="javascript:void(0)" during linting.
Juriy Zaytsev [Wed, 10 Mar 2010 17:37:04 +0000 (12:37 -0500)]
Start testing HTMLLint. Add detection of href="javascript:void(0)" during linting.

14 years agoAdd detection of `href="javascript:void 0"` to todo.
Juriy Zaytsev [Wed, 10 Mar 2010 02:57:53 +0000 (21:57 -0500)]
Add detection of `href="javascript:void 0"` to todo.

14 years agoAdd test with optgroups to "removing optional tags in <option>".
Juriy Zaytsev [Wed, 10 Mar 2010 02:12:57 +0000 (21:12 -0500)]
Add test with optgroups to "removing optional tags in <option>".

14 years agoAdd README.md;
Juriy Zaytsev [Wed, 10 Mar 2010 02:04:15 +0000 (21:04 -0500)]
Add README.md;
Add </option> to tags allowed for deletion (thanks Jakub Vrna).

14 years agoDelete JS comment delimeters before HTML comment delimeters in scripts.
Juriy Zaytsev [Tue, 9 Mar 2010 15:02:15 +0000 (10:02 -0500)]
Delete JS comment delimeters before HTML comment delimeters in scripts.

14 years agoFix comments in scripts (forgot that "<!--" strips everything till new line; thanks...
Juriy Zaytsev [Tue, 9 Mar 2010 14:21:16 +0000 (09:21 -0500)]
Fix comments in scripts (forgot that "<!--" strips everything till new line; thanks @zoompf for reminder).

14 years agoFix a bug with space-less attributes. Move scripts to the bottom.
Juriy Zaytsev [Mon, 8 Mar 2010 06:06:23 +0000 (01:06 -0500)]
Fix a bug with space-less attributes. Move scripts to the bottom.

14 years agoAdd TR to the list of optional end tags.
Juriy Zaytsev [Thu, 4 Mar 2010 23:21:54 +0000 (18:21 -0500)]
Add TR to the list of optional end tags.

14 years agoSlight optimization to `trimWhitespace`. Fix bug with `removeEmptyElements` cutting...
Juriy Zaytsev [Mon, 1 Mar 2010 16:35:30 +0000 (11:35 -0500)]
Slight optimization to `trimWhitespace`. Fix bug with `removeEmptyElements` cutting off tags in some cases.

14 years agoFix grammatical error.
Juriy Zaytsev [Fri, 26 Feb 2010 17:32:13 +0000 (12:32 -0500)]
Fix grammatical error.

14 years agoAdd "thead", "tbody" and "tfoot" end tags to "allowed for removal" list.
Juriy Zaytsev [Fri, 26 Feb 2010 14:25:32 +0000 (09:25 -0500)]
Add "thead", "tbody" and "tfoot" end tags to "allowed for removal" list.

14 years agoName button "minify" not "convert". Restyle todo list slightly.
Juriy Zaytsev [Fri, 26 Feb 2010 14:20:38 +0000 (09:20 -0500)]
Name button "minify" not "convert". Restyle todo list slightly.

14 years agoTest `removeEmptyAttributes` on IMG element (should not remove "src" and "alt" attrib...
Juriy Zaytsev [Thu, 25 Feb 2010 22:08:45 +0000 (17:08 -0500)]
Test `removeEmptyAttributes` on IMG element (should not remove "src" and "alt" attributes).

14 years agoWarn about style attributes.
Juriy Zaytsev [Wed, 24 Feb 2010 06:10:25 +0000 (01:10 -0500)]
Warn about style attributes.

14 years agoTest whitespace collapsing in style element.
Juriy Zaytsev [Wed, 24 Feb 2010 06:00:51 +0000 (01:00 -0500)]
Test whitespace collapsing in style element.

14 years agoConvert tabs to spaces in htmlparser.js.
Juriy Zaytsev [Mon, 22 Feb 2010 03:15:30 +0000 (22:15 -0500)]
Convert tabs to spaces in htmlparser.js.

14 years agoAdd link to source on github. Remove redundant comment from index.html.
Juriy Zaytsev [Mon, 22 Feb 2010 01:39:04 +0000 (20:39 -0500)]
Add link to source on github. Remove redundant comment from index.html.

14 years agoAdd todo item "Wanr about missing doctype"
Juriy Zaytsev [Sat, 20 Feb 2010 21:07:48 +0000 (16:07 -0500)]
Add todo item "Wanr about missing doctype"

14 years agoAdd GA.
Juriy Zaytsev [Mon, 15 Feb 2010 14:03:35 +0000 (09:03 -0500)]
Add GA.

14 years agoBump version to 0.4.
Juriy Zaytsev [Fri, 12 Feb 2010 21:30:37 +0000 (16:30 -0500)]
Bump version to 0.4.

14 years agoExtract LINT logic into a separate file -- htmllint.js, now also under a standalone...
Juriy Zaytsev [Fri, 12 Feb 2010 21:28:20 +0000 (16:28 -0500)]
Extract LINT logic into a separate file -- htmllint.js, now also under a standalone constructor -- HTMLLint (still needs tests)

14 years agoAdd ability to remove optional tags (</body> and </html> for now);
Juriy Zaytsev [Fri, 12 Feb 2010 05:54:00 +0000 (00:54 -0500)]
Add ability to remove optional tags (</body> and </html> for now);
Bump to version 0.3;
Reorganize main page slightly.

14 years agoSlight refactoring.
Juriy Zaytsev [Thu, 11 Feb 2010 22:30:58 +0000 (17:30 -0500)]
Slight refactoring.

14 years agoRemove "write more tests" from todo. Looks like all current cases are already covered.
Juriy Zaytsev [Thu, 11 Feb 2010 21:30:04 +0000 (16:30 -0500)]
Remove "write more tests" from todo. Looks like all current cases are already covered.

14 years agoAdd tests for collapsing boolean attributes.
Juriy Zaytsev [Thu, 11 Feb 2010 21:08:08 +0000 (16:08 -0500)]
Add tests for collapsing boolean attributes.

14 years agoFix logic error with charset attribute check.
Juriy Zaytsev [Thu, 11 Feb 2010 21:03:26 +0000 (16:03 -0500)]
Fix logic error with charset attribute check.
Write more tests for removing redundant attributes.

14 years agoTrim whitespace around values of event handler attributes.
Juriy Zaytsev [Thu, 11 Feb 2010 20:43:18 +0000 (15:43 -0500)]
Trim whitespace around values of event handler attributes.
More test cases for "javascript:" cleaning.

14 years agoDo not strip conditional comments (write tests for it and mention on a main page).
Juriy Zaytsev [Thu, 11 Feb 2010 18:30:57 +0000 (13:30 -0500)]
Do not strip conditional comments (write tests for it and mention on a main page).
Fix CDATA sections.

14 years agoFix typo. Fix CDATA bug.
Juriy Zaytsev [Wed, 10 Feb 2010 22:56:37 +0000 (17:56 -0500)]
Fix typo. Fix CDATA bug.

14 years agoAdd option to strip CDATA sections from script and style elements.
Juriy Zaytsev [Wed, 10 Feb 2010 22:21:03 +0000 (17:21 -0500)]
Add option to strip CDATA sections from script and style elements.

14 years agoBump version to 0.2 on main page.
Juriy Zaytsev [Wed, 10 Feb 2010 19:36:14 +0000 (14:36 -0500)]
Bump version to 0.2 on main page.

14 years agoAdd MIT license and mention it in htmlminifier.js;
Juriy Zaytsev [Wed, 10 Feb 2010 19:34:08 +0000 (14:34 -0500)]
Add MIT license and mention it in htmlminifier.js;
Add checkbox to remove empty elements (off by default);
Add checkbox to remove comments from STYLE and SCRIPT elements;
Collapse whitespace in textnodes, when it's safe to do so;
Rename options to get rid of "should" prefix.

14 years agoFix some of the bugs in element removal mechanism. Write more tests for it.
Juriy Zaytsev [Wed, 10 Feb 2010 17:34:24 +0000 (12:34 -0500)]
Fix some of the bugs in element removal mechanism. Write more tests for it.

14 years agoRefactor `minify` function slightly. More tests — case normalization, space normaliza...
Juriy Zaytsev [Tue, 9 Feb 2010 18:17:18 +0000 (13:17 -0500)]
Refactor `minify` function slightly. More tests — case normalization, space normalization and options.

14 years agoAdd tests for removing quotes around attributes.
Juriy Zaytsev [Tue, 9 Feb 2010 00:04:28 +0000 (19:04 -0500)]
Add tests for removing quotes around attributes.

14 years agoCollapse whitespace in class attributes to 1 space (not only trim).
Juriy Zaytsev [Mon, 8 Feb 2010 23:57:34 +0000 (18:57 -0500)]
Collapse whitespace in class attributes to 1 space (not only trim).