|
|
@ -18,11 +18,13 @@ var simpleTags = [
|
|
|
|
'</span>',
|
|
|
|
'</span>',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
['a', 'b', 'em', 'p', 'i', 'code', 'li',].forEach(function (tag) {
|
|
|
|
['a', 'b', 'em',/* 'p',*/ 'i', 'code', 'li',].forEach(function (tag) {
|
|
|
|
simpleTags.push('<' + tag + '>');
|
|
|
|
simpleTags.push('<' + tag + '>');
|
|
|
|
simpleTags.push('</' + tag + '>');
|
|
|
|
simpleTags.push('</' + tag + '>');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var found_tags = {};
|
|
|
|
|
|
|
|
|
|
|
|
// these keys are known to be problematic
|
|
|
|
// these keys are known to be problematic
|
|
|
|
var KNOWN_ISSUES = [ // FIXME
|
|
|
|
var KNOWN_ISSUES = [ // FIXME
|
|
|
|
//'newVersion',
|
|
|
|
//'newVersion',
|
|
|
@ -67,7 +69,10 @@ var processLang = function (map, lang, primary) {
|
|
|
|
var usesHTML;
|
|
|
|
var usesHTML;
|
|
|
|
|
|
|
|
|
|
|
|
s.replace(/<[\s\S]*?>/g, function (html) {
|
|
|
|
s.replace(/<[\s\S]*?>/g, function (html) {
|
|
|
|
if (simpleTags.indexOf(html) !== -1) { return; }
|
|
|
|
if (simpleTags.includes(html)) {
|
|
|
|
|
|
|
|
found_tags[html] = 1;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
announce();
|
|
|
|
announce();
|
|
|
|
usesHTML = true;
|
|
|
|
usesHTML = true;
|
|
|
|
if (!primary) {
|
|
|
|
if (!primary) {
|
|
|
@ -126,3 +131,8 @@ processLang(EN, 'en', true);
|
|
|
|
console.error(err);
|
|
|
|
console.error(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
simpleTags.forEach(html => {
|
|
|
|
|
|
|
|
if (found_tags[html]) { return; }
|
|
|
|
|
|
|
|
console.log(`html exemption '${html}' is unnecessary.`);
|
|
|
|
|
|
|
|
});
|
|
|
|