diff options
Diffstat (limited to 'src/html/parser.nim')
-rw-r--r-- | src/html/parser.nim | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/html/parser.nim b/src/html/parser.nim index 6f5ad937..d28be97b 100644 --- a/src/html/parser.nim +++ b/src/html/parser.nim @@ -307,12 +307,6 @@ proc processDocumentStartElement(state: var HTMLParseState, element: Element, ta case element.tagType of VoidTagTypes: processDocumentEndNode(state) - if element.tagType == TAG_LINK: - if HTMLLinkElement(element).s != nil: - let content = HTMLLinkElement(element).s.readAll() - HTMLLinkElement(element).sheet = parseStylesheet(content) - HTMLLinkElement(element).s.close() - HTMLLinkElement(element).parentElement.sheets.add(HTMLLinkElement(element).sheet) of TAG_LI: HTMLLIElement(element).applyOrdinal() #needs to know parent else: discard @@ -336,8 +330,8 @@ proc processDocumentEndElement(state: var HTMLParseState, tag: DOMParsedTag) = var str = "" for child in style.textNodes: str &= child.data - style.sheet = newStringStream(str).parseStylesheet() - style.parentElement.sheets.add(style.sheet) + let sheet = newStringStream(str).parseStylesheet() + style.parentElement.sheets.add(sheet) else: discard processDocumentEndNode(state) |