Skip to content

Commit 245d05f

Browse files
committed
[css2] Only check for duplicate words that start with a letter.
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402930
1 parent 6429047 commit 245d05f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

css2/bin/chkspaces

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Check for lack of space before a start tag and
33
# after and end tag.
44
# Ian Jacobs
5-
# $Id: chkspaces,v 1.9 2006-10-09 18:55:52 ihickson Exp $
5+
# $Id: chkspaces,v 1.10 2009-04-20 13:40:26 bbos Exp $
66

77
$PROGNAME = substr($0, rindex($0, "/") + 1);
88

@@ -22,7 +22,7 @@ sub readfile {
2222
$pattern1 = "(<\\/[^>]+>\\w+)";
2323
$pattern2 = "(\\w(?:<(\\w+)\\s*[^>]*>)+)";
2424
# Check for duplicate words.
25-
$pattern3 = "(\\b(\\w+)(?:\\s+|\\s*(?:<[^>]+>)+\\s*|\\s*(?:<\\/[^>]+>)+\\s*)\\2\\b)";
25+
$pattern3 = "(\\b([a-z]\\w*)(?:\\s+|\\s*(?:<[^>]+>)+\\s*|\\s*(?:<\\/[^>]+>)+\\s*)\\2\\b)";
2626

2727
foreach $file (@ARGV) {
2828
print STDOUT "Checking $file\n";

0 commit comments

Comments
 (0)