Fixed behavior of emphasize bytes

This commit is contained in:
Borys Levytskyi
2015-05-06 21:36:44 +03:00
parent bd7f66a946
commit 0e4f16a47e

View File

@@ -93,8 +93,11 @@ app.compose(function () {
Array.prototype.forEach.call(list, function(el){
var bin = el.textContent;
if(cmdConfig.emphasizeBytes) {
bin = bin.replace(/(\d{8})/g, '<span class="byte">$1</span>');
}
el.innerHTML = bin
.replace(/(\d{8})/g, '<span class="byte">$1</span>')
.replace(/0/g, '<span class="zero">0</span>')
.replace(/1/g, '<span class="one">1</span>');
});