Permalink
Browse files

Implemented whitespace counting

  • Loading branch information...
1 parent e47d989 commit 621b6a92873154900d75b495f0d7bf903a75686f @eromba eromba committed Nov 26, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 htmlanalyzer.py
View
@@ -40,6 +40,7 @@ def load(self, html):
def analyze(self):
return {
'numChars': len( self.html ),
+ 'numWhitespaceChars': len( re.findall('\s', self.html) ),
'numIframes': self.countElems('iframe'),
'numScripts': self.countElems('script'),
'numScriptsWithWrongExtension': self.countElems('script', self.hasWrongExtension),

0 comments on commit 621b6a9

Please sign in to comment.