summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6c3dfb3)
This makes it possible to target nodes via [attr|=value] CSS selector
var toret = $('<div></div>').attr('wlxml-tag', tagName);
var currentTag = $(this);
if(currentTag.attr('class'))
var toret = $('<div></div>').attr('wlxml-tag', tagName);
var currentTag = $(this);
if(currentTag.attr('class'))
- toret.attr('wlxml-class', currentTag.attr('class'));
+ toret.attr('wlxml-class', currentTag.attr('class').replace(/\./g, '-'));
toret.append(currentTag.contents());
return toret;
});
toret.append(currentTag.contents());
return toret;
});
var currentTag = $(this);
var toret = $('<span></span>').attr('wlxml-tag', tagName);
if(currentTag.attr('class'))
var currentTag = $(this);
var toret = $('<span></span>').attr('wlxml-tag', tagName);
if(currentTag.attr('class'))
- toret.attr('wlxml-class', currentTag.attr('class'));
+ toret.attr('wlxml-class', currentTag.attr('class').replace(/\./g, '-'));
toret.append(currentTag.contents());
return toret;
});
toret.append(currentTag.contents());
return toret;
});
var tagName = div.attr('wlxml-tag');
var toret = $('<'+tagName+'>');
if(div.attr('wlxml-class'))
var tagName = div.attr('wlxml-tag');
var toret = $('<'+tagName+'>');
if(div.attr('wlxml-class'))
- toret.attr('class', div.attr('wlxml-class'))
+ toret.attr('class', div.attr('wlxml-class').replace(/-/g, '.'))
toret.append(div.contents());
return toret;
});
toret.append(div.contents());
return toret;
});