Skip to content

Commit

Permalink
fix: partial url regexp (#2382)
Browse files Browse the repository at this point in the history
It was not working with relative URLs not starting with /
Now it determines url as partial if it does not start with http: or https:
  • Loading branch information
AlexP11223 authored Aug 10, 2021
1 parent f14a1ca commit 61af2a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/model/helpers/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface LinksBuilderOptions {
urlSelector?: string;
}

const isPartialUrlRegExp = /^\/[^/]/i;
const isPartialUrlRegExp = /^(?!https?:).*/i;

export function getProductLinksBuilder(options: LinksBuilderOptions) {
return (docElement: cheerio.Cheerio, series: Series): Link[] => {
Expand Down

0 comments on commit 61af2a4

Please sign in to comment.