mirror of
https://github.com/erusev/parsedown.git
synced 2025-03-17 11:59:41 +01:00
Fixes erusev/parsedown-extra#67. This introduces PHP 5.3+ late static binding to the Singleton pattern in Parsedown. It will return an instance of Parsedown which inherits the class which called the `instance()` method rather than always returning instance of just `Parsedown`. Tests are testing this feature with a test class which inherits from Parsedown. Notice that calling `instance()` with the default arguments after an instance of `Parsedown` was already created, it will return it even though it is from just an instance of `Parsedown`. So this is fixing the problem just partially.