From: Reimar Döffinger Date: Sat, 5 Sep 2015 10:41:19 +0000 (+0200) Subject: Fix WiktionarySplitter breakage. X-Git-Url: http://gitweb.fperrin.net/?p=DictionaryPC.git;a=commitdiff_plain;h=630124b5608367ffd59549099125b4956b40bf86 Fix WiktionarySplitter breakage. --- diff --git a/src/com/hughes/android/dictionary/engine/WiktionarySplitter.java b/src/com/hughes/android/dictionary/engine/WiktionarySplitter.java index 4faef89..97c64a7 100644 --- a/src/com/hughes/android/dictionary/engine/WiktionarySplitter.java +++ b/src/com/hughes/android/dictionary/engine/WiktionarySplitter.java @@ -39,8 +39,9 @@ public class WiktionarySplitter extends org.xml.sax.helpers.DefaultHandler { // The matches the whole line, otherwise regexes don't work well on French: // {{=uk=}} - // Spanish has no initial headings, so also detect {{ES as such... - static final Pattern headingStart = Pattern.compile("^(\\{\\{ES|(=+)[^=]).*$", Pattern.MULTILINE); + // Spanish has no initial headings, tried to also detect {{ES as such + // with "^(\\{\\{ES|(=+)[^=]).*$" but that broke English. + static final Pattern headingStart = Pattern.compile("^(=+)[^=].*$", Pattern.MULTILINE); final Map> pathToSelectors = new LinkedHashMap>(); List currentSelectors = null;