Skip to content

Commit

Permalink
Fix REGEX
Browse files Browse the repository at this point in the history
  • Loading branch information
demchenkoalex committed May 24, 2021
1 parent 549067a commit 2381146
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flyerhq/react-native-link-preview",
"version": "1.3.0",
"version": "1.3.1",
"description": "Fully customizable preview of the URL extracted from the provided text.",
"homepage": "https://github.com/flyerhq/react-native-link-preview#readme",
"main": "lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export const REGEX_IMAGE_CONTENT_TYPE = /image\/*/g
// Consider empty line after img tag and take only the src field, space before to not match data-src for example
export const REGEX_IMAGE_TAG = /<img[\n\r]*.*? src=["'](.*?)["']/g
export const REGEX_LINK =
/([\w+]+:\/\/)?([\w\d-]+\.)*[\w-]+[.:]\w+([/?=&#.]?[\w-]+)*\/?/g
/([\w+]+:\/\/)?([\w\d-]+\.)*[\w-]+[.:]\w+([/?=&#.]?[\w-]+)*\/?/i
// Some pages write content before the name/property, some use single quotes instead of double
export const REGEX_META =
/<meta.*?(property|name)=["'](.*?)["'].*?content=["'](.*?)["'].*?>/g
Expand Down

0 comments on commit 2381146

Please sign in to comment.