mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-10 12:53:54 -04:00
Anoter misplaced hatnote
Former-commit-id: 4020fec7a6648c41cec4fa3f01c98a6679112436 [formerly 39a0fc81b9214768a9ea4745f60d5ea19549e28a] Former-commit-id: a1dfc680a75e150fdd025aa9d2769061f5116015
This commit is contained in:
parent
d175a08f06
commit
4e86cc7ce0
@ -1896,7 +1896,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
|
|||||||
htmlArticle = htmlArticle.replace(/(<\/h1>\s*)/i, "$1" + hatnote[1].replace(/(<div\s+)/i,'$1style="padding-top:10px;" '));
|
htmlArticle = htmlArticle.replace(/(<\/h1>\s*)/i, "$1" + hatnote[1].replace(/(<div\s+)/i,'$1style="padding-top:10px;" '));
|
||||||
}
|
}
|
||||||
//Put misplaced disambiguation header back in its correct position @TODO remove this when fixed in mw-offliner
|
//Put misplaced disambiguation header back in its correct position @TODO remove this when fixed in mw-offliner
|
||||||
var noexcerpt = htmlArticle.match(/<dl>(?:[^<]|<(?!\/dl>))+?excerpt(?:[^<]|<(?!\/dl>))+?For other places with the same name(?:[^<]|<(?!\/dl>))+?<\/dl>\s*/i);
|
var noexcerpt = htmlArticle.match(/<dl\b(?:[^<]|<(?!\/dl>))+?(?:For other places with the same name|Not to be confused with)(?:[^<]|<(?!\/dl>))+?<\/dl>\s*/i);
|
||||||
if (noexcerpt && noexcerpt.length) {
|
if (noexcerpt && noexcerpt.length) {
|
||||||
htmlArticle = htmlArticle.replace(noexcerpt, "");
|
htmlArticle = htmlArticle.replace(noexcerpt, "");
|
||||||
htmlArticle = htmlArticle.replace(/(<\/h1>\s*)/i, "$1" + noexcerpt);
|
htmlArticle = htmlArticle.replace(/(<\/h1>\s*)/i, "$1" + noexcerpt);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user