Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Attr order wasn't being properly updated
Browse files Browse the repository at this point in the history
  • Loading branch information
natecavanaugh committed Feb 29, 2016
1 parent da9acfd commit 7b58936
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,8 @@ Formatter.HTML = Formatter.create(

var filePath = this.file;

var prevLine = line;

line = line.replace(
/<[^>]+>/g,
function(m, mi, str) {
Expand All @@ -689,7 +691,7 @@ Formatter.HTML = Formatter.create(

var trackSort = {};

attrs.forEach(
attrs = attrs.map(
function(item, index, collection) {
var oldItem = item;

Expand All @@ -707,6 +709,8 @@ Formatter.HTML = Formatter.create(
lastAttr = attrName;

m = m.replace(oldItem, item);

return item;
}
);

Expand Down

0 comments on commit 7b58936

Please sign in to comment.