From 2d1abfdec59fb6447bb4009324d47950f01f0165 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Wed, 17 Sep 2014 11:17:57 +0800 Subject: [PATCH] Fix bug where HTML meta is counted as text content --- MacDown/Code/Document/MPDocument.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MacDown/Code/Document/MPDocument.m b/MacDown/Code/Document/MPDocument.m index 2692bf6..c8e8c17 100644 --- a/MacDown/Code/Document/MPDocument.m +++ b/MacDown/Code/Document/MPDocument.m @@ -192,9 +192,10 @@ static NSString *MPAutosavePropertyKey( case 11: if ([self respondsToSelector:@selector(tagName)]) { - NSString *tagName = [(id)self tagName]; + NSString *tagName = [(id)self tagName].uppercaseString; if ([tagName isEqualToString:@"SCRIPT"] - || [tagName isEqualToString:@"STYLE"]) + || [tagName isEqualToString:@"STYLE"] + || [tagName isEqualToString:@"HEAD"]) break; } for (DOMNode *c = self.firstChild; c; c = c.nextSibling)