You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't think of anything within an <img> element which should be altered by Markdown. Alt text can't contain HTML elements, src shouldn't be altered, it's a self-closing element so won't have any contents.
Are there any downsides to adding img to this regex?
The text was updated successfully, but these errors were encountered:
Note that you can add no-break spaces on those empty lines if you want to fix things without fussing with the code.
Also, we have the same problem with other tags too:
<span title="A
multiline
title">text with title</span>
I think the basic issue is that the HTML block parser ignores span-level tags. Those are parsed at a later stage in parseSpan, but that stage is after splitting in paragraphs.
I suppose changing the regex here to accept all tag names would work.
It's possible the following code dealing with the matched tag won't know what to do with those new tag names.
It's also possible parseSpan will need adjustments for dealing with those hashed tags.
There could be some interactions with code spans. Currently the HTML block parser attempts to ignore them by detecting code span markers, but code spans are in reality later in parseSpan. Disagreements between the two algorithms could cause some behaviors to change when it comes to tags in code spans.
If I have this HTML:
It is transformed into:
Changing this line:
php-markdown/Michelf/MarkdownExtra.php
Line 342 in 5161316
to
Fixes the issue.
I can't think of anything within an
<img>
element which should be altered by Markdown. Alt text can't contain HTML elements, src shouldn't be altered, it's a self-closing element so won't have any contents.Are there any downsides to adding img to this regex?
The text was updated successfully, but these errors were encountered: