From e6b62f67033f36e948e7d11044aaf118105e22dd Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Sat, 12 Jan 2013 15:45:33 -0500 Subject: [PATCH] Regularized parsing of comments to match newer HTML spec (not trying to balance `--` inside of a comment tag). --- smartypants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartypants.php b/smartypants.php index 39aa719..3958c06 100644 --- a/smartypants.php +++ b/smartypants.php @@ -547,7 +547,7 @@ function tokenizeHTML($str) { $index = 0; $tokens = array(); - $match = '(?s:)|'. # comment + $match = '(?s:)|'. # comment '(?s:<\?.*?\?>)|'. # processing instruction # regular tags '(?:<[/!$]?[-a-zA-Z0-9:]+\b(?>[^"\'>]+|"[^"]*"|\'[^\']*\')*>)';