fix inline code parser

This commit is contained in:
yggverse 2024-06-24 04:56:36 +03:00
parent 889cca12b5
commit 652b605739

View file

@ -17,7 +17,7 @@ class Code
{ {
// Inline ^```preformatted``` // Inline ^```preformatted```
case preg_match( case preg_match(
'/^(?<tag>[`]{3})(?<inline>[^`]+)(?<close>[`]{3})$/m', '/^(?<tag>[`]{3})(?<alt>[^`]+)(?<close>[`]{3})$/m',
$line, $line,
$matches $matches
): ):
@ -68,7 +68,7 @@ class Code
if (self::match($line, $matches)) if (self::match($line, $matches))
{ {
return isset($matches['inline']); return isset($matches['close']);
} }
return false; return false;