Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xxczaki committed Feb 22, 2020
1 parent 40c2201 commit 01674d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default function parse(expression: string): Options {
let from;
let to;

// Search for `to` keyword (case insensitive) to split the expression into 2 parts
if (/to|in|into|as/i.exec(expression)) {
// Search for separating keyword (case insensitive) to split the expression into 2 parts
if (/to|in|as/i.exec(expression)) {
const firstPart = expression.slice(0, expression.search(/to|in|as/i)).toUpperCase().trim();

from = firstPart.replace(/(?<currency_code>[^A-Za-z])/g, '');
Expand Down

0 comments on commit 01674d6

Please sign in to comment.