From d4b8a56a969aad442ab6ad530040e68447dca683 Mon Sep 17 00:00:00 2001 From: "darch.dk" Date: Sun, 8 Oct 2023 12:14:02 +0200 Subject: [PATCH] Adding support for emtry alt-text in img-tags --- Slimdown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Slimdown.php b/Slimdown.php index a755ba1..8da9321 100644 --- a/Slimdown.php +++ b/Slimdown.php @@ -25,7 +25,7 @@ class Slimdown { public static $rules = array ( '/```(.*?)```/s' => self::class .'::code_parse', // code blocks '/\n(#+)(.*)/' => self::class .'::header', // headers - '/\!\[([^\[]+)\]\(([^\)]+)\)/' => self::class .'::img', // images + '/\!\[(.*?)\]\(([^\)]+)\)/' => self::class .'::img', // images '/\[([^\[]+)\]\(([^\)]+)\)/' => self::class .'::link', // links '/(\*\*|__)(?=(?:(?:[^`]*`[^`\r\n]*`)*[^`]*$))(?![^\/<]*>.*<\/.+>)(.*?)\1/' => '\2', // bold '/(\*|_)(?=(?:(?:[^`]*`[^`\r\n]*`)*[^`]*$))(?![^\/<]*>.*<\/.+>)(.*?)\1/' => '\2', // emphasis