1. Michael Shepanski
  2. jquery-wysiwym

Commits

Michael Shepanski  committed f8fddac

I think everything is working in IE8 now! ;)

  • Participants
  • Parent commits 54e81ba
  • Branches default

Comments (0)

Files changed (1)

File wysiwym/wysiwym.js

View file
  • Ignore whitespace
     this.linesHavePrefix = function(prefix) {
         for (var i=this.start.line; i <= this.end.line; i++) {
             var line = this.lines[i];
-            if ((typeof(prefix) == 'function') && (!line.match(prefix))) {
+            if ((typeof(prefix) == 'string') && (!line.startswith(prefix))) {
                 return false;
-            } else if ((typeof(prefix) == 'string') && (!line.startswith(prefix))) {
+            } else if ((typeof(prefix) != 'string') && (!line.match(prefix))) {
                 return false;
             }
         }
             var line = this.lines[i];
             var match = prefix;
             // Check prefix is a regex
-            if (typeof(prefix) == 'function')
+            if (typeof(prefix) != 'string')
                 match = line.match(prefix)[0];
             // Do the replace
             if (line.startswith(match)) {