Skip to content

Commit

Permalink
fix(convertMany): support negative numbers and leading .
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Mar 5, 2021
1 parent f27fb44 commit 14d923f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/convert-many.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const enum MatchGroups {
Unit
}

const splitExpression = /(\d+(?:\.\d+)?)([^\d\s]+)/g;
const splitExpression = /(-?(?:\d+)?\.?\d+)([^\d\s]+)/g;

/**
* Convert several values in a string into a single unit.
Expand Down

0 comments on commit 14d923f

Please sign in to comment.