From 02d6eaaec91b673cefe155c16371c0fc1d6bad7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 1 Jan 2021 10:44:38 +0100 Subject: [PATCH] Wikipedia: ignore coordinates entry when first paragraph --- src/wikipedia.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wikipedia.js b/src/wikipedia.js index 42964353..ff01c901 100644 --- a/src/wikipedia.js +++ b/src/wikipedia.js @@ -32,7 +32,7 @@ function prepare (div) { } var p = content.firstChild.firstChild - while (p && (p.tagName !== 'P' || p.className !== '' || p.textContent.match(/^\s*$/))) { + while (p && (p.tagName !== 'P' || p.className !== '' || p.textContent.match(/^\s*$/) || p.querySelector('span#coordinates'))) { p = p.nextSibling }