8000 Parsing fails due to comments in querySelectorAll call · Issue #71 · kepano/defuddle · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Parsing fails due to comments in querySelectorAll call #71
Open
@mochar

Description

@mochar

This line of code fails with the following error

Defuddle Error processing document: DOMException [SyntaxError]: '
					/* MathJax scripts and previews */
					script[type^="math/"],
					.MathJax_Preview,

					/* External math library scripts */
					script[type="text/javascript"][src*="mathjax"],
					script[type="text/javascript"][src*="katex"]
				' is not a valid selector
    at emit (/home/mochar/node_modules/nwsapi/src/nwsapi.js:669:17)
    at parse (/home/mochar/node_modules/nwsapi/src/nwsapi.js:1541:9)
    at Object._querySelectorAll [as select] (/home/mochar/node_modules/nwsapi/src/nwsapi.js:1623:21)
    at HTMLParagraphElementImpl.querySelectorAll (/home/mochar/node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js:80:26)
    at HTMLParagraphElement.querySelectorAll (/home/mochar/node_modules/jsdom/lib/jsdom/living/generated/Element.js:1119:58)
    at Object.transform (/home/mochar/node_modules/defuddle/dist/index.js:1:1096)
    at /home/mochar/node_modules/defuddle/dist/index.js:1:77006
    at Proxy.forEach (<anonymous>)
    at /home/mochar/node_modules/defuddle/dist/index.js:1:76967
    at Array.forEach (<anonymous>)

After removing the comments it works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0