From 62615f4fc56ee687f7215b14b64cdb2330697460 Mon Sep 17 00:00:00 2001 From: Aidan Woods Date: Sun, 27 Jan 2019 17:10:36 +0000 Subject: [PATCH] Allow empty code spans --- src/Components/Inlines/Code.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Components/Inlines/Code.php b/src/Components/Inlines/Code.php index ecbde6f..53b4de5 100644 --- a/src/Components/Inlines/Code.php +++ b/src/Components/Inlines/Code.php @@ -40,7 +40,7 @@ final class Code implements Inline } if (\preg_match( - '/^(['.$marker.']++)[ ]*+(.+?)[ ]*+(?text(), $matches )) { @@ -48,6 +48,8 @@ final class Code implements Inline return new self($text, \strlen($matches[0])); } + + return null; } /**