disable addSpacing, it has bugs:

1. make sub li click event buggy
2. taged chinese has space too.
This commit is contained in:
rexebin 2016-11-24 22:00:50 +00:00
parent 754e11dc13
commit dedeb6e8ac
2 changed files with 15 additions and 15 deletions

View File

@ -253,7 +253,7 @@ block create-your-app
:marked
**Create #{_an} #{_appDir} subfolder** off the project root directory:
**在应用的根目录下创建#{_appDir}子目录:
在应用的根目录下**创建#{_appDir}子目录**
code-example.code-shell.
mkdir #{_appDir}

View File

@ -101,7 +101,7 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
event.stopPropagation();
$current.toggleClass('hidden');
});
addSpacingBetweenCnAndEn(sibling);
// addSpacingBetweenCnAndEn(sibling);
return true;
}
}
@ -138,17 +138,17 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
attributesToString(node1) === attributesToString(node2);
}
function addSpacingBetweenCnAndEn(nodeCn) {
var text = nodeCn.innerHTML;
text = text.replace(/([\x20-\xff]+)/g, function (word) {
if (!word.replace(/\s/, '')) {
return '';
} else if (/<[^>]*>/.test(word)) {
return ' ' + word + ' ';
} else {
return ' ' + word + ' ';
}
});
nodeCn.innerHTML = text;
}
// function addSpacingBetweenCnAndEn(nodeCn) {
// var text = nodeCn.innerHTML;
// text = text.replace(/([\x20-\xff]+)/g, function (word) {
// if (!word.replace(/\s/, '')) {
// return '';
// } else if (/<[^>]*>/.test(word)) {
// return ' ' + word + ' ';
// } else {
// return ' ' + word + ' ';
// }
// });
// nodeCn.innerHTML = text;
// }
})(angular.element);