From 6b09a663b362b7c2e5801edea66f171832081b6f Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Wed, 28 Feb 2018 08:10:53 +0000 Subject: [PATCH] Workaround for misplaced homonymie hatnotes in French Wikipedia See https://github.com/openzim/mwoffliner/issues/182 Former-commit-id: 127a9972d35309f6fc9e4758fca23c138a328242 [formerly cdb085d280f76c37b7fbceb092d9f158a884170c] Former-commit-id: 1aadf0b1ad19958dfbd87bc356e8aedaaa46090e --- www/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/js/app.js b/www/js/app.js index 817a9d6b..e71bba39 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -1677,7 +1677,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module' htmlArticle = htmlArticle.replace(/]+>[^/]*?User:Popo[^<]+<\/span>\s*/i, ""); //Put misplaced hatnote headers inside

block back in correct position @TODO remove this when fixed in mw-offliner - var hatnote = htmlArticle.match(/]+\bhatnote\b[\s\S]+?<\/div>\s*)+)/i); + var hatnote = htmlArticle.match(/]+\b(?:hatnote|homonymie)\b[\s\S]+?<\/div>\s*)+)/i); if (hatnote && hatnote.length > 1) { htmlArticle = htmlArticle.replace(hatnote[1], ""); htmlArticle = htmlArticle.replace(/(<\/h1>\s*)/i, "$1" + hatnote[1].replace(/(