fix: #177
This commit is contained in:
parent
28a51f44ec
commit
560e52768e
@ -31,10 +31,12 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
|
|||||||
var count = 0;
|
var count = 0;
|
||||||
for (var i = 0; i < container.children.length; i++) {
|
for (var i = 0; i < container.children.length; i++) {
|
||||||
var node = container.children[i];
|
var node = container.children[i];
|
||||||
var ignoredTagNames = ['CODE-EXAMPLE', 'SCRIPT', 'CODE', 'EM', 'STRONG'];
|
console.log(node);
|
||||||
|
var ignoredTagNames = ['CODE-EXAMPLE', 'SCRIPT', 'CODE', 'EM', 'STRONG', 'CODE-TABS'];
|
||||||
// ignore example code.
|
// ignore example code.
|
||||||
if (node.classList.contains('code-example') ||
|
if (node.classList.contains('code-example') ||
|
||||||
ignoredTagNames.indexOf(node.tagName) >= 0) {
|
ignoredTagNames.indexOf(node.tagName) >= 0) {
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +93,7 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
|
|||||||
if (isPureEnglish(current.textContent)) {
|
if (isPureEnglish(current.textContent)) {
|
||||||
if (sibling.children) {
|
if (sibling.children) {
|
||||||
processContainer(sibling);
|
processContainer(sibling);
|
||||||
}
|
}
|
||||||
$current.addClass('original-english');
|
$current.addClass('original-english');
|
||||||
$sibling.addClass('translated');
|
$sibling.addClass('translated');
|
||||||
$sibling.addClass('translated-cn');
|
$sibling.addClass('translated-cn');
|
||||||
@ -103,8 +105,8 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
|
|||||||
});
|
});
|
||||||
// addSpacingBetweenCnAndEn(sibling);
|
// addSpacingBetweenCnAndEn(sibling);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user