Skip to content

Commit 61248ff

Browse files
committed
Add support for numbers in the tag names.
1 parent 03503ce commit 61248ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/HTMLServerComponentsCompiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public function addAlias(string $alias, string $original)
5858
*/
5959
public function addTag(string $tagName, string $src)
6060
{
61-
if (preg_match('/^[a-z\-]+$/', $tagName) !== 1) {
62-
throw new \InvalidArgumentException('The tag name provided is not valid! It may contain letters (a-z) and dashes (-).');
61+
if (preg_match('/^[a-z0-9\-]+$/', $tagName) !== 1) {
62+
throw new \InvalidArgumentException('The tag name provided is not valid! It may contain letters (a-z), numbers (0-9) and dashes (-).');
6363
}
6464
$this->tags[strtolower(trim($tagName))] = $src;
6565
}

0 commit comments

Comments
 (0)