Project

General

Profile

Feature #1575 » 0003-IE11-support.patch

Mizuki ISHIKAWA, 2020-02-26 03:19

View differences:

public/javascripts/jstoolbar/markdown.js
178 178
    wiki: function() {
179 179
      var This = this;
180 180
      this.tableMenu(function(cols, rowCount){
181
        This.encloseLineSelection(('|'+cols.join(' |')+' |\n') + ('|--'.repeat(cols.length)+'|\n') + (('|  '.repeat(cols.length))+'|\n').repeat(rowCount));
181
        This.encloseLineSelection(
182
          '|'+cols.join(' |')+' |\n' +                                   // header
183
          Array(cols.length+1).join('|--')+'|\n' +                       // second line
184
          Array(rowCount+1).join(Array(cols.length+1).join('|  ')+'|\n') // cells
185
        );
182 186
      });
183 187
    }
184 188
  }
public/javascripts/jstoolbar/textile.js
178 178
    wiki: function() {
179 179
      var This = this;
180 180
      this.tableMenu(function(cols, rowCount){
181
        This.encloseLineSelection(('|_.'+cols.join('|_.')+'|\n') + (('|  '.repeat(cols.length))+'|\n').repeat(rowCount));
181
        This.encloseLineSelection(
182
          '|_.'+cols.join('|_.')+'|\n' +                                 // header
183
          Array(rowCount+1).join(Array(cols.length+1).join('|  ')+'|\n') // cells
184
        );
182 185
      });
183 186
    }
184 187
  }
(10-10/12)