Remove strictly numeric tags exception
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 20 Jan 2021 13:10:20 +0000 (08:10 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 20 Jan 2021 13:10:20 +0000 (08:10 -0500)
- It prevented to use year number hashtags for no clear benefit

src/Content/Text/BBCode.php

index 25812db..ded3e2f 100644 (file)
@@ -2104,11 +2104,6 @@ class BBCode
                                                continue;
                                        }
 
-                                       // ignore strictly numeric tags like #1
-                                       if ((strpos($match, '#') === 0) && ctype_digit(substr($match, 1))) {
-                                               continue;
-                                       }
-
                                        // try not to catch url fragments
                                        if (strpos($string, $match) && preg_match('/[a-zA-z0-9\/]/', substr($string, strpos($string, $match) - 1, 1))) {
                                                continue;