mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Don't assume marker type is correct
This commit is contained in:
parent
cbe7b25b21
commit
4563ee592d
@ -56,7 +56,11 @@ final class Emphasis implements Inline
|
||||
return null;
|
||||
}
|
||||
|
||||
$marker = $Excerpt->text()[0] === '*' ? '*' : '_';
|
||||
$marker = $Excerpt->text()[0];
|
||||
|
||||
if ($marker !== '*' && $marker !== '_') {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($Excerpt->text()[1] === $marker && \preg_match(self::$STRONG_REGEX[$marker], $Excerpt->text(), $matches)) {
|
||||
$emphasis = 'strong';
|
||||
|
Loading…
Reference in New Issue
Block a user