]> gitweb.fperrin.net Git - DictionaryPC.git/commitdiff
Fix WiktionarySplitter breakage.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 5 Sep 2015 10:41:19 +0000 (12:41 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 5 Sep 2015 10:41:19 +0000 (12:41 +0200)
src/com/hughes/android/dictionary/engine/WiktionarySplitter.java

index 4faef895aa7b70eb086acfd9d119f41bc4004b47..97c64a74a3766f2a315d9d95686d4c44039bed9b 100644 (file)
@@ -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<String,List<Selector>> pathToSelectors = new LinkedHashMap<String, List<Selector>>();
   List<Selector> currentSelectors = null;