We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please see this
Example works when class MarkdownPlugin extends \Parsedown but not when extending ParsedownExtra (version 0.8.0). Why is that?
class MarkdownPlugin extends \Parsedown
ParsedownExtra
0.8.0
class MarkdownPlugin extends \ParsedownExtra { protected function inlineImage($excerpt) { $element = parent::inlineImage($excerpt); if (!is_array($element ?? null)) { return null; } // wrap img with div $block = [ 'extent' => $element['extent'], 'element' => [ 'name' => 'div', 'handler' => 'element', 'text' => $element, 'attributes' => [ 'class' => 'my-img-wrap', ], ], ]; return $block; } }
This is my test case:
![my-image](my-image.jpg)
<div class="my-img-wrap'"> <img src="my-image.jpg" alt="my-image"> </div>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Please see this
Example works when
class MarkdownPlugin extends \Parsedown
but not when extendingParsedownExtra
(version0.8.0
).Why is that?
This is my test case:
The text was updated successfully, but these errors were encountered: