We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents beed422 + b42957d commit a3833e3Copy full SHA for a3833e3
src/Traits/Indexable.php
@@ -17,7 +17,11 @@ public function index($version)
17
18
$result = [];
19
foreach($pages as $page) {
20
- $page = explode("{{version}}", $page)[1];
+ $split = explode("{{version}}", $page);
21
+ if (count($split) <= 1)
22
+ continue;
23
+
24
+ $page = $split[1];
25
$pageContent = $this->get($version, $page);
26
27
if(! $pageContent)
@@ -57,7 +61,7 @@ protected function getPages($version)
57
61
$path = base_path(config('larecipe.docs.path').'/'.$version.'/index.md');
58
62
59
63
// match all markdown urls => [title](url)
60
- preg_match_all('/\(([^)]+)\)/', $this->files->get($path), $matches);
64
+ preg_match_all('/\[.+\]\((.+)\)/', $this->files->get($path), $matches);
65
66
return $matches[1];
67
}
0 commit comments