thesli/laravel-jade-engine-package — pull request #6 by kylefarris (2014-11-26 03:24:49+00:00)
Title: Properly Remove '.jade' Extension

Your implementation of `rtrim` was invalid. The way you had it setup, the script would remove any "period, j, a, d, or e" from the end of the file name--that's how PHP's rtrim works. So, if someone passed in something like "homepage" like I did, the "e" kept getting removed from the filename. The solution is simple and even more powerful because it will replace .jade and even .JADE from the end of the file name.