Skip to content

Commit 71e5f64

Browse files
committed
Fixed #375
1 parent 14f29a5 commit 71e5f64

File tree

5 files changed

+1317
-0
lines changed

5 files changed

+1317
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [4.2.5] - 2020-08-01
9+
### Fixed
10+
- Github TypeError exception with some urls [#375]
11+
812
## [4.2.4] - 2020-07-06
913
### Fixed
1014
- Ignore invalid urls instead throw an exception
@@ -74,7 +78,9 @@ Full library refactoring.
7478
[#356]: https://github.com/oscarotero/Embed/issues/356
7579
[#357]: https://github.com/oscarotero/Embed/issues/357
7680
[#366]: https://github.com/oscarotero/Embed/issues/366
81+
[#375]: https://github.com/oscarotero/Embed/issues/375
7782

83+
[4.2.5]: https://github.com/oscarotero/Embed/compare/v4.2.4...v4.2.5
7884
[4.2.4]: https://github.com/oscarotero/Embed/compare/v4.2.3...v4.2.4
7985
[4.2.3]: https://github.com/oscarotero/Embed/compare/v4.2.2...v4.2.3
8086
[4.2.2]: https://github.com/oscarotero/Embed/compare/v4.2.1...v4.2.2

src/Adapters/Github/Detectors/Code.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@ private function fallback(): ?EmbedCode
4141
//https://help.github.com/articles/3d-file-viewer/#embedding-your-model-elsewhere
4242
return new EmbedCode(html('script', ['src' => "https://embed.githubusercontent.com/view/3d/{$username}/{$repo}/{$ref}/{$file}"]));
4343
}
44+
45+
return null;
4446
}
4547
}

tests/PagesTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ public function testGithub()
136136
$this->assertEmbed('https://gist.github.com/oscarotero/7749998');
137137
$this->assertEmbed('https://github.com/benbalter/dc-wifi-social/blob/master/bars.geojson');
138138
$this->assertEmbed('https://github.com/skalnik/secret-bear-clip/blob/master/stl/clip.stl');
139+
$this->assertEmbed('https://github.com/oscarotero/Embed/blob/master/composer.json');
139140
}
140141

141142
public function testGoogle()

0 commit comments

Comments
 (0)