Skip to content

Commit

Permalink
merged from develop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mulholland committed Jun 25, 2019
2 parents efb56af + f72b6b0 commit f0ffdc9
Show file tree
Hide file tree
Showing 11 changed files with 198 additions and 3,886 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"e2e": "yarn run clean && yarn run pack && yarn run cucumber:postpack",
"e2e:dev": "yarn run cucumber:postpack:dev && yarn run cucumber:report",
"cucumber:postpack": "cross-env BABEL_ENV=test nyc cucumber-js --require-module babel-core/register test/features -f json:test/cucumber_report.json",
"cucumber:postpack:dev": "cross-env BABEL_ENV=test nyc cucumber-js --require-module babel-core/register --tags @dev test/features -f json:test/cucumber_report.json",
"cucumber:postpack:dev": "cross-env BABEL_ENV=test nyc cucumber-js --fail-fast --require-module babel-core/register --tags @dev test/features -f json:test/cucumber_report.json",
"cucumber:postpack:impl": "cross-env BABEL_ENV=test nyc cucumber-js --require-module babel-core/register --tags @impl test/features -f json:test/cucumber_report.json",
"cucumber:postpack:witharg": "cross-env BABEL_ENV=test cucumber-js --require-module babel-core/register --tags @impl -f json:test/cucumber_report.json",
"cucumber:report": "node test/cucumber-report.js",
Expand Down
7 changes: 5 additions & 2 deletions src/renderer/partials/FindReplace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,15 @@ export default {
hot.loadData(data)
this.clickedFindOrReplace = 'replace'
},
// Ensure replace, like find, is case insensitive
getReplacedAllFindTextFromCell: function(data, row, col) {
let cellText = data[row][col]
let caseInsensitiveCellText = cellText.toLowerCase()
let caseInsensitiveFindTextValue = this.findTextValue.toLowerCase()
// ensure any special characters in find text are treated as ordinary text
const escapedFindText = _.escapeRegExp(this.findTextValue)
const escapedFindText = _.escapeRegExp(caseInsensitiveFindTextValue)
const regExp = new RegExp(escapedFindText, 'g')
let updatedCellText = _.replace(cellText, regExp, this.replaceTextValue)
let updatedCellText = _.replace(caseInsensitiveCellText, regExp, this.replaceTextValue)
return updatedCellText
},
previousFn: function(index, arrayLength) {
Expand Down
Loading

0 comments on commit f0ffdc9

Please sign in to comment.