Skip to content

Commit fc00ae3

Browse files
committed
update example
1 parent 8a2dde6 commit fc00ae3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

example/html-to-text.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ console.log();
1515
console.log('From file:');
1616
const filePath = new URL('test.html', import.meta.url);
1717
/** @type { Options } */
18-
const options = { tables: ['#invoice', '.address'] };
18+
const options = {
19+
selectors: [
20+
{ selector: 'table', format: 'block' },
21+
{ selector: 'table#invoice', format: 'dataTable' },
22+
{ selector: 'table.address', format: 'dataTable' },
23+
]
24+
};
1925
const text2 = htmlToText(readFileSync(filePath, 'utf8'), options);
2026
console.log(text2);

0 commit comments

Comments
 (0)