Skip to content

Commit

Permalink
Merge branch 'release-candidate/3.4.0'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Sources/Regex.swift
  • Loading branch information
LeonardoCardoso committed Jul 27, 2021
2 parents 589d073 + 7801914 commit 3eb30b1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
## [3.4.0](https://github.com/LeonardoCardoso/Swift-Link-Preview/releases/tag/3.4.0)

#### Added
- Added support for m3u8 lists
- Added support for m3u8 lists [#138](https://github.com/LeonardoCardoso/SwiftLinkPreview/issues/138)
- Added by [jeffhodsdon](https://github.com/jeffhodsdon)

#### Changed
- Resolve relative image URLs against the request URL.
- Resolve relative image URLs against the request URL. [#136](https://github.com/LeonardoCardoso/SwiftLinkPreview/issues/136)
- Changed by [lhunath](https://github.com/lhunath)
- Video parsing fix
- Video parsing fix [#138](https://github.com/LeonardoCardoso/SwiftLinkPreview/issues/138)
- Changed by [jeffhodsdon](https://github.com/jeffhodsdon)
- Fixed github link image for `og:image` property.
- Fixed github link image for `og:image` property. [#145](https://github.com/LeonardoCardoso/SwiftLinkPreview/issues/145)
- Changed by [MuhtasimTanmoy](https://github.com/MuhtasimTanmoy/)

## [3.3.0](https://github.com/LeonardoCardoso/Swift-Link-Preview/releases/tag/3.3.0)
Expand All @@ -43,6 +43,8 @@
- Changed by [lhunath](https://github.com/lhunath)
- fixed youtube and open graph tags image metadata issues
- Changed by [nafis042](https://github.com/nafis042)
- Fixed github link image for `og:image` property.
- Changed by [MuhtasimTanmoy](https://github.com/MuhtasimTanmoy/)

## [3.2.0](https://github.com/LeonardoCardoso/Swift-Link-Preview/releases/tag/3.2.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class ViewController: UIViewController {
"www.youtube.com",
"www.google.com",
"facebook.com",

"https://github.com/LeonardoCardoso/SwiftLinkPreview",

"https://leocardz.com/swift-link-preview-5a9860c7756f",
"NASA! 🖖🏽 https://www.nasa.gov/",
Expand All @@ -57,7 +59,6 @@ class ViewController: UIViewController {
"Youtube?! It does! https://www.youtube.com/watch?v=cv2mjAgFTaI",
"Also Vimeo https://vimeo.com/67992157",

"Even with image itself https://lh6.googleusercontent.com/-aDALitrkRFw/UfQEmWPMQnI/AAAAAAAFOlQ/mDh1l4ej15k/w337-h697-no/db1969caa4ecb88ef727dbad05d5b5b3.jpg",
"Well, it's a gif! https://goo.gl/jKCPgp"
]

Expand Down
5 changes: 2 additions & 3 deletions Sources/Regex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import Foundation

// MARK: - Regular expressions
class Regex {

static let imagePattern = "(.+?)\\.(gif|jpg|jpeg|png|bmp)\\?.*$"
static let videoPattern = "(.+?)\\.(mp4|mpeg|avi|mov|m3u8)\\?.*$"

static let imagePattern = "(.+?)\\.(gif|jpg|jpeg|png|bmp)$"
static let openGraphImagePattern = "(.+?)\\.(gif||jpg|jpeg|png|bmp)$"
static let videoTagPattern = "<video[^>]+src=\"([^\"]+)"
static let secondaryVideoTagPattern = "og:video\"(.+?)content=\"([^\"](.+?))\"(.+?)[/]?>"
Expand Down

0 comments on commit 3eb30b1

Please sign in to comment.