Skip to content

Commit

Permalink
Merge pull request #131 from reload/4922-more-regex-fix
Browse files Browse the repository at this point in the history
Don't use advanced regex not supported by Safari
  • Loading branch information
kasperg authored May 5, 2021
2 parents 57afdd6 + c895c37 commit 4ba5f45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/apps/related-materials/related-materials.entry.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function useGetRelatedMaterials({
function stringToArray(string) {
// Replace escaped commas with newlines (which doesn't make sense in a comma
// separated string) so we wont split on them.
const unescapedParts = replace(string, "\\,", "\n").split(/(?<!\\),/);
const unescapedParts = replace(string, "\\,", "\n").split(/,/);
const escapedParts = unescapedParts.map(part => replace(part, "\n", ","));
// Remove leading and trailing spaces and empty values.
const trimmedParts = escapedParts.map(part => part.trim());
Expand Down

0 comments on commit 4ba5f45

Please sign in to comment.