Skip to content

Commit d6d8eb9

Browse files
tangledhelixcpeel
authored andcommitted
Don't throw errors if <!doctype line is lowercase
Fixes #28
1 parent f7651f0 commit d6d8eb9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎ppcomp/ppcomp.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
4949
/* Add spaces around td tags */
5050
td::before, td::after { content: " "; }
51-
51+
5252
/* Remove thought breaks */
5353
.tb { display: none; }
5454
@@ -501,7 +501,7 @@ def load(self, filename):
501501
raise SyntaxError('Not an html file: ' + filename)
502502
super().load(filename)
503503
try:
504-
if 0 <= self.text.find('<!DOCTYPE html>', 0, 100): # limit search
504+
if "<!doctype html>" in self.text[:100].lower(): # limit search
505505
self.tree, errors = self.parse_html5()
506506
else:
507507
self.tree, errors = self.parse_html()

0 commit comments

Comments
 (0)