OSDN Git Service

Correct problem where any: tag could cause a problem with highlighting words.
authorRandy Baumgarte <randy@fbn.cx>
Sat, 29 Jan 2011 17:34:36 +0000 (12:34 -0500)
committerRandy Baumgarte <randy@fbn.cx>
Sun, 30 Jan 2011 13:37:39 +0000 (08:37 -0500)
src/cx/fbn/nevernote/xml/XMLInsertHilight.java

index 3c65f9e..cab8c07 100644 (file)
@@ -141,6 +141,12 @@ public class XMLInsertHilight {
        private String buildRegex() {\r
                StringBuffer regex = new StringBuffer();\r
                \r
+               // Remove any empty terms of it screws things up later\r
+               for (int j=terms.size()-1; j>=0; j--) {\r
+                       if (terms.get(j).trim().equals(""))\r
+                               terms.remove(j);\r
+               }\r
+               \r
                for (int i=0; i<terms.size(); i++) {\r
                        String term = terms.get(i);\r
                        if (term.indexOf("*") > -1) {\r