Although it is working fine so far, it is somewhat unpleasant to modify the source code directly.
It would be much better if all these modifications were in a different file such that Parsedown could be loaded like:
require_once 'Parsedown.php'; // Original version of Parsedown source code
require_once 'Parsedown_sub_superscript.php'; // Extension with support for sub/superscript
$Parsedown = new SubSuperscriptParsedown();
echo $Parsedown->text('The H~2~O formula for water was found in the 19^th^ century.');
Output:
<p>The H<sub>2</sub>O formula for water was found in the 19<sup>th</sup> century.</p>
Therefore, is it possible to push all these modifications into a different file?
Currently I'm using a modified version of Parsedown that supports subscripts and superscripts (ex: H\~2\~O, 19^th^):
Original Parsedown vs Sub/Superscript Version
Although it is working fine so far, it is somewhat unpleasant to modify the source code directly.
It would be much better if all these modifications were in a different file such that Parsedown could be loaded like:
Therefore, is it possible to push all these modifications into a different file?