Skip to content
This repository was archived by the owner on Jan 18, 2025. It is now read-only.

Commit 3eb30b1

Browse files
Merge branch 'release-candidate/3.4.0'
# Conflicts: # Sources/Regex.swift
2 parents 589d073 + 7801914 commit 3eb30b1

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
## [3.4.0](https://github.com/LeonardoCardoso/Swift-Link-Preview/releases/tag/3.4.0)
2626

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

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

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

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

Example/SwiftLinkPreviewExample/Controllers/ViewController.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class ViewController: UIViewController {
3838
"www.youtube.com",
3939
"www.google.com",
4040
"facebook.com",
41+
42+
"https://github.com/LeonardoCardoso/SwiftLinkPreview",
4143

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

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

Sources/Regex.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import Foundation
99

1010
// MARK: - Regular expressions
1111
class Regex {
12-
13-
static let imagePattern = "(.+?)\\.(gif|jpg|jpeg|png|bmp)\\?.*$"
14-
static let videoPattern = "(.+?)\\.(mp4|mpeg|avi|mov|m3u8)\\?.*$"
12+
13+
static let imagePattern = "(.+?)\\.(gif|jpg|jpeg|png|bmp)$"
1514
static let openGraphImagePattern = "(.+?)\\.(gif||jpg|jpeg|png|bmp)$"
1615
static let videoTagPattern = "<video[^>]+src=\"([^\"]+)"
1716
static let secondaryVideoTagPattern = "og:video\"(.+?)content=\"([^\"](.+?))\"(.+?)[/]?>"

0 commit comments

Comments
 (0)