Skip to content

Commit

Permalink
Merge pull request jgodson#30 from jgodson/fix-bug-with-dollar-sign-r…
Browse files Browse the repository at this point in the history
…eplacements

Fix bug with dollar sign replacements
  • Loading branch information
jgodson authored Jun 4, 2020
2 parents 75a40e8 + 449e18d commit ac6fad6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/ChangeLogContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ export default function ChangeLogContent({newVersion} = props) {
<h3 id="changelog">Change Log</h3>

<ul>
<li>Fixed a bug when using a combination of the "Bundle Discount" campaign, "Cart Has Items" Cart Qualifier and "Has Properties" Item Selector</li>
<li>Renamed “Cart/Item subtotal” <b>Cart Qualifier</b> to “Cart/Item/Discount subtotal” and re-worded options to be more clear.</li>
<li>0.26.1 - Fixed a bug when using a combination of the "Bundle Discount" campaign, "Cart Has Items" Cart Qualifier and "Has Properties" Item Selector</li>
<li>0.26.1 - Renamed “Cart/Item subtotal” <b>Cart Qualifier</b> to “Cart/Item/Discount subtotal” and re-worded options to be more clear.</li>
<li>0.26.2 - Fixed a bug that would cause $1 in some fields to dissapear when editing the campaign</li>
</ul>

<div style={{paddingTop: '2rem'}}>
Expand Down
3 changes: 3 additions & 0 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
if (index === 0 && values[index] === "") { continue; }

if (values[index] !== null) {
// Replace any $ with $$ so we don't replace $<#> with matches in the regex
values[index] = values[index].replace(/\$/g, '$$$');

output = output.replace(/{\w+\??:\w+:[\w\s'.(),]+:?([\w\s|,]+)?}/, values[index]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/versions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
currentVersion: "0.26.1",
currentVersion: "0.26.2",
minimumVersion: "0.1.0",
}

0 comments on commit ac6fad6

Please sign in to comment.