From dedeb6e8ac7df6bd7fb8370dae82ae20d1c68d98 Mon Sep 17 00:00:00 2001 From: rexebin Date: Thu, 24 Nov 2016 22:00:50 +0000 Subject: [PATCH] disable addSpacing, it has bugs: 1. make sub li click event buggy 2. taged chinese has space too. --- public/docs/ts/latest/quickstart.jade | 2 +- public/translate/cn/translate.js | 28 +++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/public/docs/ts/latest/quickstart.jade b/public/docs/ts/latest/quickstart.jade index a452db44f5..c5cdf11ac3 100644 --- a/public/docs/ts/latest/quickstart.jade +++ b/public/docs/ts/latest/quickstart.jade @@ -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} diff --git a/public/translate/cn/translate.js b/public/translate/cn/translate.js index cb4f495540..3e85a80eef 100644 --- a/public/translate/cn/translate.js +++ b/public/translate/cn/translate.js @@ -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);