Skip to content

Commit

Permalink
Regularized parsing of comments to match newer HTML spec (not trying …
Browse files Browse the repository at this point in the history
…to balance `--` inside of a comment tag).
  • Loading branch information
michelf committed Jan 12, 2013
1 parent 128a350 commit e6b62f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smartypants.php
Expand Up @@ -547,7 +547,7 @@ function tokenizeHTML($str) {
$index = 0;
$tokens = array();

$match = '(?s:<!(?:--.*?--\s*)+>)|'. # comment
$match = '(?s:<!--.*?-->)|'. # comment
'(?s:<\?.*?\?>)|'. # processing instruction
# regular tags
'(?:<[/!$]?[-a-zA-Z0-9:]+\b(?>[^"\'>]+|"[^"]*"|\'[^\']*\')*>)';
Expand Down

0 comments on commit e6b62f6

Please sign in to comment.