Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fix prefix in element endTag #44

wants to merge 1 commit into from

3 participants


Fixed element's endTags the same way it was fixed for startTags: sohira@2542791


When trying to minify:


it was changing the order of the tags:


This commit fixes it.


This issue is also fixed by #50. Feel free to close this PR.

@kangax kangax closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 10, 2013
  1. @samaxes

    Fix prefix in element endTag.

    samaxes committed
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/htmlparser.js
2  src/htmlparser.js
@@ -28,7 +28,7 @@
// Regular Expressions for parsing tags and attributes
var startTag = /^<([\w:-]+)((?:\s*[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
- endTag = /^<\/(\w+)[^>]*>/,
+ endTag = /^<\/([\w:-]+)[^>]*>/,
attr = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,
doctype = /^<!DOCTYPE [^>]+>/i;
Something went wrong with that request. Please try again.