1
0
mirror of https://github.com/pattern-lab/patternlab-php.git synced 2025-01-17 14:18:30 +01:00

fixing when the mustache loader needs to add the file extension

This commit is contained in:
Dave Olsen 2013-06-25 22:01:02 -04:00
parent 395c0c3b8c
commit 506c9f8821

View File

@ -115,8 +115,7 @@ class Mustache_Loader_PatternLoader implements Mustache_Loader
{
$fileName = $this->baseDir . '/' . $name;
if (substr($fileName, 0 - strlen($this->extension)) !== $this->extension) {
preg_match('/\/(([amotp])\-([A-z0-9]{1,})\-([A-z0-9-]{1,}))$/',$fileName,$matches);
$fileName .= "/".$matches[1].$this->extension;
$fileName .= $this->extension;
}
return $fileName;
}