Skip to content

Add fragment parsing option for $.load() #4

@kaldrenon

Description

@kaldrenon

Simple example:

$ = whacko.load('<h1>This should be alone</h1>');
console.log($.html());

I expect and want the output from that log statement to be:

<h1>This should be alone</h1>

Instead, the output is:

<html><head></head><body><h1>This should be alone</h1></body></html>

Is there a config option for this, or a method I should use instead of html()? I reviewed Cheerio's API and the options for the parser, and I couldn't find anything for this.

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