File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ final public static function outputDirectory(): string
144144 */
145145 final public static function fileExtension (): string
146146 {
147- return '. ' .ltrim (static ::$ fileExtension , '. ' );
147+ return rtrim ( '. ' .ltrim (static ::$ fileExtension, ' . ' ) , '. ' );
148148 }
149149
150150 /**
Original file line number Diff line number Diff line change @@ -203,6 +203,13 @@ public function test_get_file_extension_forces_leading_period()
203203 $ this ->resetDirectoryConfiguration ();
204204 }
205205
206+ public function test_get_file_extension_removes_trailing_period ()
207+ {
208+ MarkdownPage::$ fileExtension = 'foo. ' ;
209+ $ this ->assertEquals ('.foo ' , MarkdownPage::fileExtension ());
210+ $ this ->resetDirectoryConfiguration ();
211+ }
212+
206213 public function test_get_identifier_returns_identifier_property ()
207214 {
208215 $ page = new MarkdownPage ('foo ' );
You can’t perform that action at this time.
0 commit comments