Skip to content

Commit

Permalink
Update loading.md
Browse files Browse the repository at this point in the history
import * as cheerio from 'cheerio';

const $ = cheerio.load('<html><body><h1>Hello, world!</h1></body></html>');

console.log($('h1').text());

instead of h1, the title was mentioned so the output was empty string
  • Loading branch information
harishcarpenter1 authored Oct 5, 2023
1 parent 8daacd5 commit d470b48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/basics/loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import * as cheerio from 'cheerio';

const $ = cheerio.load('<html><body><h1>Hello, world!</h1></body></html>');

console.log($('title').text());
console.log($('h1').text());
// Output: Hello, world!
```

Expand Down

0 comments on commit d470b48

Please sign in to comment.