I am trying to extend a class:
class CustomParsedown extends Parsedown {
protected function blockComment($Line) { return; }
protected function blockCommentContinue($Line, array $Block) { return; }
protected function blockHeader($Line) { return; }
protected function blockSetextHeader($Line, array $Block = NULL) { return; }
}
function markdown($markdown) {
return CustomParsedown::instance()->setMarkupEscaped(true)->text($markdown);
}
If I run markdown()
with markdown from another page, the changes in the code do not go into effect. For example, I can still create a heading. Am I extending the class correctly?