Add unit tests for <load> @load syntax of template v2

This commit is contained in:
Kijin Sung 2023-10-16 00:50:20 +09:00
parent 3e1587c2ac
commit 1b9e2f58b7
2 changed files with 77 additions and 1 deletions

View file

@ -473,7 +473,7 @@ class TemplateParser_v2
{
$info['type'] = $match[2];
}
elseif (preg_match('#^([\'"])(screen|print)\1$#', $value, $match))
elseif (preg_match('#^([\'"])((?:screen|print)[^\'"]*)\1$#', $value, $match))
{
$info['media'] = $match[2];
}