Skip to content

Commit

Permalink
potential bugfix when pasting previous copied data from excel
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Ungers committed Apr 16, 2021
1 parent 48b04f1 commit 0f7d467
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/controllers/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -5285,9 +5285,9 @@ export default function luckysheetHandler() {
if (txtdata.indexOf("luckysheet_copy_action_table") > - 1 && Store.luckysheet_copy_save["copyRange"] != null && Store.luckysheet_copy_save["copyRange"].length > 0) {
//剪贴板内容解析
let cpDataArr = [];

let reg = new RegExp('<tr.*?>(.*?)</tr>', 'g');
let reg2 = new RegExp('<td.*?>(.*?)</td>', 'g');
let reg = new RegExp('<tr.*?>(.*?)</tr>', 'gs');
let reg2 = new RegExp('<td.*?>(.*?)</td>', 'gs');

let regArr = txtdata.match(reg);

Expand All @@ -5298,7 +5298,7 @@ export default function luckysheetHandler() {

if (reg2Arr != null) {
for (let j = 0; j < reg2Arr.length; j++) {
let cpValue = reg2Arr[j].replace(/<td.*?>/g, "").replace(/<\/td>/g, "");
let cpValue = reg2Arr[j].replace(/<td.*?>/gs, "").replace(/<\/td>/gs, "");
cpRowArr.push(cpValue);
}
}
Expand Down

0 comments on commit 0f7d467

Please sign in to comment.